mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestCustomCommsNamespace_LinkLayer.java
@After
    public void tearDown() throws IOException, InterruptedException
    {
        try
        {
            //cleanup
            RemoteLinkLayerUtils.removeLink(linkUuid, socket);
            RemoteLinkLayerUtils.removeLink(linkUuid2, socket);
            
            // request data to remove the created physical links in setup
            RemotePhysicalLinkUtils.tryRemovePhysicalLink(pLinkUuid, socket);
            RemotePhysicalLinkUtils.tryRemovePhysicalLink(pLinkUuid2, socket);
            
            // verify physical links are gone
            List<SharedMessages.UUID> uuidList = 
                    CustomCommsNamespaceUtils.getLayerUuidsByType(socket, CommType.PhysicalLink);
            assertThat(uuidList.contains(pLinkUuid), is(false));
            assertThat(uuidList.contains(pLinkUuid2), is(false));
            uuidList = CustomCommsNamespaceUtils.getLayerUuidsByType(socket, CommType.Linklayer);
            assertThat(uuidList.contains(linkUuid), is(false));
            assertThat(uuidList.contains(linkUuid2), is(false));
            
            MessageListener.unregisterEvent(socket); 
        }
        finally
        {
            socket.close();
        }
    }
/**
     * Remove the layers created in the setup.
     */
Remove the layers created in the setup.
Remove the layers created in the setup .
@After
    public void tearDown() throws IOException, InterruptedException
    {
        try
        {
            RemoteLinkLayerUtils.removeLink(linkUuid, socket);
            RemoteLinkLayerUtils.removeLink(linkUuid2, socket);
            RemotePhysicalLinkUtils.tryRemovePhysicalLink(pLinkUuid, socket);
            RemotePhysicalLinkUtils.tryRemovePhysicalLink(pLinkUuid2, socket);
            List<SharedMessages.UUID> uuidList = 
                    CustomCommsNamespaceUtils.getLayerUuidsByType(socket, CommType.PhysicalLink);
            assertThat(uuidList.contains(pLinkUuid), is(false));
            assertThat(uuidList.contains(pLinkUuid2), is(false));
            uuidList = CustomCommsNamespaceUtils.getLayerUuidsByType(socket, CommType.Linklayer);
            assertThat(uuidList.contains(linkUuid), is(false));
            assertThat(uuidList.contains(linkUuid2), is(false));
            MessageListener.unregisterEvent(socket); 
        }
        finally
        {
            socket.close();
        }
    }
@ After public void tearDown ( ) throws IOException , InterruptedException { try { RemoteLinkLayerUtils . removeLink ( linkUuid , socket ) ; RemoteLinkLayerUtils . removeLink ( linkUuid2 , socket ) ; RemotePhysicalLinkUtils . tryRemovePhysicalLink ( pLinkUuid , socket ) ; RemotePhysicalLinkUtils . tryRemovePhysicalLink ( pLinkUuid2 , socket ) ; List < SharedMessages . UUID > uuidList = CustomCommsNamespaceUtils . getLayerUuidsByType ( socket , CommType . PhysicalLink ) ; assertThat ( uuidList . contains ( pLinkUuid ) , is ( false ) ) ; assertThat ( uuidList . contains ( pLinkUuid2 ) , is ( false ) ) ; uuidList = CustomCommsNamespaceUtils . getLayerUuidsByType ( socket , CommType . Linklayer ) ; assertThat ( uuidList . contains ( linkUuid ) , is ( false ) ) ; assertThat ( uuidList . contains ( linkUuid2 ) , is ( false ) ) ; MessageListener . unregisterEvent ( socket ) ; } finally { socket . close ( ) ; } }
Remove the layers created in the setup.
Remove the layers created in the setup .
//cleanup // request data to remove the created physical links in setup // verify physical links are gone