mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetMgrImpl.java
@Test
    public void testHandleGetPropertyResponse()
    {

        Event getAssetsReponse = mockGetAssetsResponse(systemId1);
        
        //this should render two assets for the system id
        m_AssetDirHelper.handleEvent(getAssetsReponse);

        //verify assets added
        assertThat(m_SUT.getAssetsForControllerAsync(systemId1).size(), is(2));

        //create config admin appropriate event
        Event getPropertyRequest = mockGetPropertyResponse(systemId1);

        //handle event
        m_AssetHelper.handleEvent(getPropertyRequest);

        //verify
        List<AssetModel> models = m_SUT.getAssetsForControllerAsync(systemId1);

        //check that the appropriate model was updated, should be asset with pid1
        for (AssetModel model : models)
        {
            if (model.getPid().equals(pid1))
            {
                assertThat(model.getName(), is("Prime"));
            }
        }
    }
/**
     * Test the handling of get property request event, this will return the assets name.
     * Verify name is set.
     */
Test the handling of get property request event, this will return the assets name.
Verify name is set.
Test the handling of get property request event this will return the assets name . Verify name is set .
@Test
    public void testHandleGetPropertyResponse()
    {
        Event getAssetsReponse = mockGetAssetsResponse(systemId1);
        m_AssetDirHelper.handleEvent(getAssetsReponse);
        assertThat(m_SUT.getAssetsForControllerAsync(systemId1).size(), is(2));
        Event getPropertyRequest = mockGetPropertyResponse(systemId1);
        m_AssetHelper.handleEvent(getPropertyRequest);
        List<AssetModel> models = m_SUT.getAssetsForControllerAsync(systemId1);
        for (AssetModel model : models)
        {
            if (model.getPid().equals(pid1))
            {
                assertThat(model.getName(), is("Prime"));
            }
        }
    }
@ Test public void testHandleGetPropertyResponse ( ) { Event getAssetsReponse = mockGetAssetsResponse ( systemId1 ) ; m_AssetDirHelper . handleEvent ( getAssetsReponse ) ; assertThat ( m_SUT . getAssetsForControllerAsync ( systemId1 ) . size ( ) , is ( 2 ) ) ; Event getPropertyRequest = mockGetPropertyResponse ( systemId1 ) ; m_AssetHelper . handleEvent ( getPropertyRequest ) ; List < AssetModel > models = m_SUT . getAssetsForControllerAsync ( systemId1 ) ; for ( AssetModel model : models ) { if ( model . getPid ( ) . equals ( pid1 ) ) { assertThat ( model . getName ( ) , is ( "Prime" ) ) ; } } }
Test the handling of get property request event, this will return the assets name.
Test the handling of get property request event this will return the assets name .
//this should render two assets for the system id //verify assets added //create config admin appropriate event //handle event //verify //check that the appropriate model was updated, should be asset with pid1