mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAddAssetDialogHelperImpl.java
@Test
    public void testInit()
    {
        //name for asset
        String name = "James";

        //check that no name is set
        assertThat(m_SUT.getNewAssetName(), is(nullValue()));

        //set a name
        m_SUT.setNewAssetName(name);

        //verify
        assertThat(m_SUT.getNewAssetName(), is(name));
        
        //mock asset factory
        AssetFactoryModel model = mock(AssetFactoryModel.class);

        //check that is set factory returns false as there is no factory set
        assertThat(m_SUT.isSetAssetFactory(), is(false));

        //set a factory model
        m_SUT.setAssetFactory(model);

        //verify
        assertThat(m_SUT.isSetAssetFactory(), is(true));

        //call init
        m_SUT.init();
        
        //verify
        assertThat(m_SUT.isSetAssetFactory(), is(false));
        assertThat(m_SUT.getNewAssetName().isEmpty(), is(true));
    }
/**
     * Test the initialization of fields.
     * 
     * Verify that all fields are reset.
     */
Test the initialization of fields.

Verify that all fields are reset.
Test the initialization of fields . Verify that all fields are reset .
@Test
    public void testInit()
    {
        String name = "James";
        assertThat(m_SUT.getNewAssetName(), is(nullValue()));
        m_SUT.setNewAssetName(name);
        assertThat(m_SUT.getNewAssetName(), is(name));
        AssetFactoryModel model = mock(AssetFactoryModel.class);
        assertThat(m_SUT.isSetAssetFactory(), is(false));
        m_SUT.setAssetFactory(model);
        assertThat(m_SUT.isSetAssetFactory(), is(true));
        m_SUT.init();
        assertThat(m_SUT.isSetAssetFactory(), is(false));
        assertThat(m_SUT.getNewAssetName().isEmpty(), is(true));
    }
@ Test public void testInit ( ) { String name = "James" ; assertThat ( m_SUT . getNewAssetName ( ) , is ( nullValue ( ) ) ) ; m_SUT . setNewAssetName ( name ) ; assertThat ( m_SUT . getNewAssetName ( ) , is ( name ) ) ; AssetFactoryModel model = mock ( AssetFactoryModel . class ) ; assertThat ( m_SUT . isSetAssetFactory ( ) , is ( false ) ) ; m_SUT . setAssetFactory ( model ) ; assertThat ( m_SUT . isSetAssetFactory ( ) , is ( true ) ) ; m_SUT . init ( ) ; assertThat ( m_SUT . isSetAssetFactory ( ) , is ( false ) ) ; assertThat ( m_SUT . getNewAssetName ( ) . isEmpty ( ) , is ( true ) ) ; }
Test the initialization of fields.
Test the initialization of fields .
//name for asset //check that no name is set //set a name //verify //mock asset factory //check that is set factory returns false as there is no factory set //set a factory model //verify //call init //verify