mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAddAssetDialogHelperImpl.java
@Test
    public void testRequestCreateAsset()
    {
        //controller id to use
        int systemId = 321;

        //create variables
        String productType = "mil.dod.you.me.Everybody";
        String name = "EverybodyAsset";

        m_SUT.requestCreateAsset(productType, systemId, name);

        //verify message sent to remove the assetS
        ArgumentCaptor<CreateAssetRequestData> request = 
            ArgumentCaptor.forClass(CreateAssetRequestData.class);

        verify(m_MessageFactory).createAssetDirectoryServiceMessage(
            eq(AssetDirectoryServiceMessageType.CreateAssetRequest), 
                request.capture());
        verify(m_MessageWrapper).queue(eq(systemId), Mockito.any(RemoteCreateAssetHandler.class));
        verify(m_AssetMgr).createRemoteAssetHandler();

        //get message
        CreateAssetRequestData requestCapture = request.getValue();

        //verify
        assertThat(requestCapture.getProductType(), is(productType));
    }
/**
     * Test the request to create a new asset.
     * Verify message sent.
     * Verify response handler requested from asset manager.
     */
Test the request to create a new asset.
Verify message sent.
Verify response handler requested from asset manager.
Test the request to create a new asset . Verify message sent . Verify response handler requested from asset manager .
@Test
    public void testRequestCreateAsset()
    {
        int systemId = 321;
        String productType = "mil.dod.you.me.Everybody";
        String name = "EverybodyAsset";
        m_SUT.requestCreateAsset(productType, systemId, name);
        ArgumentCaptor<CreateAssetRequestData> request = 
            ArgumentCaptor.forClass(CreateAssetRequestData.class);
        verify(m_MessageFactory).createAssetDirectoryServiceMessage(
            eq(AssetDirectoryServiceMessageType.CreateAssetRequest), 
                request.capture());
        verify(m_MessageWrapper).queue(eq(systemId), Mockito.any(RemoteCreateAssetHandler.class));
        verify(m_AssetMgr).createRemoteAssetHandler();
        CreateAssetRequestData requestCapture = request.getValue();
        assertThat(requestCapture.getProductType(), is(productType));
    }
@ Test public void testRequestCreateAsset ( ) { int systemId = 321 ; String productType = "mil.dod.you.me.Everybody" ; String name = "EverybodyAsset" ; m_SUT . requestCreateAsset ( productType , systemId , name ) ; ArgumentCaptor < CreateAssetRequestData > request = ArgumentCaptor . forClass ( CreateAssetRequestData . class ) ; verify ( m_MessageFactory ) . createAssetDirectoryServiceMessage ( eq ( AssetDirectoryServiceMessageType . CreateAssetRequest ) , request . capture ( ) ) ; verify ( m_MessageWrapper ) . queue ( eq ( systemId ) , Mockito . any ( RemoteCreateAssetHandler . class ) ) ; verify ( m_AssetMgr ) . createRemoteAssetHandler ( ) ; CreateAssetRequestData requestCapture = request . getValue ( ) ; assertThat ( requestCapture . getProductType ( ) , is ( productType ) ) ; }
Test the request to create a new asset.
Test the request to create a new asset .
//controller id to use //create variables //verify message sent to remove the assetS //get message //verify