mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/comms/TestCommsMgrImpl.java
@Test
    public void testRemoteLinkDoesNotExist()
    {
        // Mini test setup
        m_SUT.getPhysicalsAsync(systemId1);
        m_SUT.getLinksAsync(systemId1);
        m_SUT.getTransportsAsync(systemId1);
        Event link = mockGetLayersResponse(systemId1, "link");
           
        m_EventHelperComms.handleEvent(link); 
        
        Event layerActivateEvent = mockIsActivatedResponse(systemId1, false); 
        Event remoteLayerActivate = mockEventLinkActivated(systemId1, true); //set layer to be non-existent

        try
        {
            m_EventHelperLink.handleEvent(layerActivateEvent);
            m_EventHelper.handleEvent(remoteLayerActivate);
        }
        catch(Exception e)
        {
            fail("Unexpected exception caught: " + e.getMessage());
        }
    }
/**
     * Verify proper handling of remote link activated event.
     */
Verify proper handling of remote link activated event.
Verify proper handling of remote link activated event .
@Test
    public void testRemoteLinkDoesNotExist()
    {
        m_SUT.getPhysicalsAsync(systemId1);
        m_SUT.getLinksAsync(systemId1);
        m_SUT.getTransportsAsync(systemId1);
        Event link = mockGetLayersResponse(systemId1, "link");
        m_EventHelperComms.handleEvent(link); 
        Event layerActivateEvent = mockIsActivatedResponse(systemId1, false); 
        Event remoteLayerActivate = mockEventLinkActivated(systemId1, true); 
        try
        {
            m_EventHelperLink.handleEvent(layerActivateEvent);
            m_EventHelper.handleEvent(remoteLayerActivate);
        }
        catch(Exception e)
        {
            fail("Unexpected exception caught: " + e.getMessage());
        }
    }
@ Test public void testRemoteLinkDoesNotExist ( ) { m_SUT . getPhysicalsAsync ( systemId1 ) ; m_SUT . getLinksAsync ( systemId1 ) ; m_SUT . getTransportsAsync ( systemId1 ) ; Event link = mockGetLayersResponse ( systemId1 , "link" ) ; m_EventHelperComms . handleEvent ( link ) ; Event layerActivateEvent = mockIsActivatedResponse ( systemId1 , false ) ; Event remoteLayerActivate = mockEventLinkActivated ( systemId1 , true ) ; try { m_EventHelperLink . handleEvent ( layerActivateEvent ) ; m_EventHelper . handleEvent ( remoteLayerActivate ) ; } catch ( Exception e ) { fail ( "Unexpected exception caught: " + e . getMessage ( ) ) ; } }
Verify proper handling of remote link activated event.
Verify proper handling of remote link activated event .
// Mini test setup //set layer to be non-existent