mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetTypesMgrImpl.java
@Test
    public void testGetAssetTypesRemovedFactory()
    {
        //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"));
        
        //make sure the fetching of factories correctly represents the removed factory is gone
        getTypes = mockMessageGetAssetTypesResponseOneRemoved(systemId1);
        m_AssetHelper.handleEvent(getTypes);
        
        assertThat(m_SUT.getAssetFactoriesForControllerAsync(systemId1).size(), is(1));
    }
/**
     * Test the handling of the get asset types for a controller.
     * Verify that the product types are correctly updated to not include removed types.
     */
Test the handling of the get asset types for a controller.
Verify that the product types are correctly updated to not include removed types.
Test the handling of the get asset types for a controller . Verify that the product types are correctly updated to not include removed types .
@Test
    public void testGetAssetTypesRemovedFactory()
    {
        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"));
        getTypes = mockMessageGetAssetTypesResponseOneRemoved(systemId1);
        m_AssetHelper.handleEvent(getTypes);
        assertThat(m_SUT.getAssetFactoriesForControllerAsync(systemId1).size(), is(1));
    }
@ Test public void testGetAssetTypesRemovedFactory ( ) { 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" ) ) ; getTypes = mockMessageGetAssetTypesResponseOneRemoved ( systemId1 ) ; m_AssetHelper . handleEvent ( getTypes ) ; assertThat ( m_SUT . getAssetFactoriesForControllerAsync ( systemId1 ) . size ( ) , is ( 1 ) ) ; }
Test the handling of the get asset types for a controller.
Test the handling of the get asset types for a controller .
//load assets for system id //this should render two asset types for the system id //collect all the names //verify the FQCNs were found //make sure the fetching of factories correctly represents the removed factory is gone