mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetTypesMgrImpl.java
@Test
    public void testGetAssetTypesNoNewFactories()
    {
        //load assets for system id
        Event getTypes = mockMessageGetAssetTypesResponse(systemId1);
        
        //this should render two asset types for the system id
        m_AssetHelper.handleEvent(getTypes);
        
        assertThat(m_SUT.getAssetFactoriesForControllerAsync(systemId1).size(), is(2));

        //collect all the names
        Set<String> types = new HashSet<String>();
        for (AssetFactoryModel model : m_SUT.getAssetFactoriesForControllerAsync(systemId1))
        {
            types.add(model.getFullyQualifiedAssetType());
        }
        //verify the FQCNs were found
        assertThat(types, hasItem("super.awesome.OutOfThisWorld"));
        assertThat(types, hasItem("sometimes.youfeellikeanut.SometimesYouDont"));
        
        //this add the asset types again, should not add additional models.
        m_AssetHelper.handleEvent(getTypes);
        
        assertThat(m_SUT.getAssetFactoriesForControllerAsync(systemId1).size(), is(2));
    }
/**
     * Test the handling of the get asset types for multiple controllers.
     * Verify that the product types are correctly added.
     * Verify that the removed controller event removes the correct controller. 
     */
Test the handling of the get asset types for multiple controllers.
Verify that the product types are correctly added.
Verify that the removed controller event removes the correct controller.
Test the handling of the get asset types for multiple controllers . Verify that the product types are correctly added . Verify that the removed controller event removes the correct controller .
@Test
    public void testGetAssetTypesNoNewFactories()
    {
        Event getTypes = mockMessageGetAssetTypesResponse(systemId1);
        m_AssetHelper.handleEvent(getTypes);
        assertThat(m_SUT.getAssetFactoriesForControllerAsync(systemId1).size(), is(2));
        Set<String> types = new HashSet<String>();
        for (AssetFactoryModel model : m_SUT.getAssetFactoriesForControllerAsync(systemId1))
        {
            types.add(model.getFullyQualifiedAssetType());
        }
        assertThat(types, hasItem("super.awesome.OutOfThisWorld"));
        assertThat(types, hasItem("sometimes.youfeellikeanut.SometimesYouDont"));
        m_AssetHelper.handleEvent(getTypes);
        assertThat(m_SUT.getAssetFactoriesForControllerAsync(systemId1).size(), is(2));
    }
@ Test public void testGetAssetTypesNoNewFactories ( ) { Event getTypes = mockMessageGetAssetTypesResponse ( systemId1 ) ; m_AssetHelper . handleEvent ( getTypes ) ; assertThat ( m_SUT . getAssetFactoriesForControllerAsync ( systemId1 ) . size ( ) , is ( 2 ) ) ; Set < String > types = new HashSet < String > ( ) ; for ( AssetFactoryModel model : m_SUT . getAssetFactoriesForControllerAsync ( systemId1 ) ) { types . add ( model . getFullyQualifiedAssetType ( ) ) ; } assertThat ( types , hasItem ( "super.awesome.OutOfThisWorld" ) ) ; assertThat ( types , hasItem ( "sometimes.youfeellikeanut.SometimesYouDont" ) ) ; m_AssetHelper . handleEvent ( getTypes ) ; assertThat ( m_SUT . getAssetFactoriesForControllerAsync ( systemId1 ) . size ( ) , is ( 2 ) ) ; }
Test the handling of the get asset types for multiple controllers.
Test the handling of the get asset types for multiple controllers .
//load assets for system id //this should render two asset types for the system id //collect all the names //verify the FQCNs were found //this add the asset types again, should not add additional models.