mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/ccomm/transport/TestTransportLayerImpl.java
@Test
    public void testDelete_LinkLayerDeactivated() throws Exception
    {
        initTransportLayer(false);
        
        LinkLayer linkLayer = mock(LinkLayer.class);
        m_SUT.setLinkLayer(linkLayer);
        when(linkLayer.isActivated()).thenReturn(false);
        
        m_SUT.delete();
        
        verify(m_FactReg).delete(m_SUT);
        verify(m_TransportLayerProxy).onShutdown();
        verify(m_PowManInternal, times(3)).deleteWakeLock(m_WakeLock);
    }
/**
     * Verify the registry is called to delete the object if the link layer is not active.
     */
Verify the registry is called to delete the object if the link layer is not active.
Verify the registry is called to delete the object if the link layer is not active .
@Test
    public void testDelete_LinkLayerDeactivated() throws Exception
    {
        initTransportLayer(false);
        LinkLayer linkLayer = mock(LinkLayer.class);
        m_SUT.setLinkLayer(linkLayer);
        when(linkLayer.isActivated()).thenReturn(false);
        m_SUT.delete();
        verify(m_FactReg).delete(m_SUT);
        verify(m_TransportLayerProxy).onShutdown();
        verify(m_PowManInternal, times(3)).deleteWakeLock(m_WakeLock);
    }
@ Test public void testDelete_LinkLayerDeactivated ( ) throws Exception { initTransportLayer ( false ) ; LinkLayer linkLayer = mock ( LinkLayer . class ) ; m_SUT . setLinkLayer ( linkLayer ) ; when ( linkLayer . isActivated ( ) ) . thenReturn ( false ) ; m_SUT . delete ( ) ; verify ( m_FactReg ) . delete ( m_SUT ) ; verify ( m_TransportLayerProxy ) . onShutdown ( ) ; verify ( m_PowManInternal , times ( 3 ) ) . deleteWakeLock ( m_WakeLock ) ; }
Verify the registry is called to delete the object if the link layer is not active.
Verify the registry is called to delete the object if the link layer is not active .