mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetDisplayHelperImpl.java
@Test
    public void testGetFactoryObjectListAsync()
    {
        ControllerModel controller = mock(ControllerModel.class);
        FactoryObjMgr mgr = mock(FactoryObjMgr.class);
        AssetModel asset = new AssetModel(5, UUID.randomUUID(), "bob", "bobType", 
                mgr, m_ConfigWrapper, m_AssetTypesMgr, m_AssetImageInterface);
        List<AssetModel> assetList = new ArrayList<AssetModel>();
        assetList.add(asset);
        
        //Mock call to asset manager and active controller.
        when(m_AssetMgr.getAssetsForControllerAsync(5)).thenReturn(assetList);
        when(m_ActiveController.getActiveController()).thenReturn(controller);
        when(controller.getId()).thenReturn(5);
        
        //Verify that the list correct list is returned.
        assertThat(m_SUT.getFactoryObjectListAsync(), is(assetList));
    }
/**
     * Test the get factory object list async method.
     * Verify that the appropriate list of asset models is returned.
     */
Test the get factory object list async method.
Verify that the appropriate list of asset models is returned.
Test the get factory object list async method . Verify that the appropriate list of asset models is returned .
@Test
    public void testGetFactoryObjectListAsync()
    {
        ControllerModel controller = mock(ControllerModel.class);
        FactoryObjMgr mgr = mock(FactoryObjMgr.class);
        AssetModel asset = new AssetModel(5, UUID.randomUUID(), "bob", "bobType", 
                mgr, m_ConfigWrapper, m_AssetTypesMgr, m_AssetImageInterface);
        List<AssetModel> assetList = new ArrayList<AssetModel>();
        assetList.add(asset);
        when(m_AssetMgr.getAssetsForControllerAsync(5)).thenReturn(assetList);
        when(m_ActiveController.getActiveController()).thenReturn(controller);
        when(controller.getId()).thenReturn(5);
        assertThat(m_SUT.getFactoryObjectListAsync(), is(assetList));
    }
@ Test public void testGetFactoryObjectListAsync ( ) { ControllerModel controller = mock ( ControllerModel . class ) ; FactoryObjMgr mgr = mock ( FactoryObjMgr . class ) ; AssetModel asset = new AssetModel ( 5 , UUID . randomUUID ( ) , "bob" , "bobType" , mgr , m_ConfigWrapper , m_AssetTypesMgr , m_AssetImageInterface ) ; List < AssetModel > assetList = new ArrayList < AssetModel > ( ) ; assetList . add ( asset ) ; when ( m_AssetMgr . getAssetsForControllerAsync ( 5 ) ) . thenReturn ( assetList ) ; when ( m_ActiveController . getActiveController ( ) ) . thenReturn ( controller ) ; when ( controller . getId ( ) ) . thenReturn ( 5 ) ; assertThat ( m_SUT . getFactoryObjectListAsync ( ) , is ( assetList ) ) ; }
Test the get factory object list async method.
Test the get factory object list async method .
//Mock call to asset manager and active controller. //Verify that the list correct list is returned.