mil.dod.th.remote.client/test/mil/dod/th/remote/client/impl/TestMessageSenderServiceImpl.java
@Test
    public void testAddRemoteChannel() throws IOException
    {
        m_SUT.setClientId(CLIENT_ID);

        TerraHarvestPayload payload = createPayload();
        try
        {
            m_SUT.sendRequest(DEST_ID, payload);
            fail("sendRequest should throw IllegalArgumentException");
        }
        catch (IllegalArgumentException e)
        {
            // Expected
        }

        try
        {
            m_SUT.sendResponse(DEST_ID, payload);
            fail("sendResponse should throw IllegalArgumentException");
        }
        catch (IllegalArgumentException e)
        {
            // Expected
        }

        m_SUT.addRemoteChannel(DEST_ID, m_OutStream, m_ChannelCallback);

        m_SUT.sendRequest(DEST_ID, payload);
        m_SUT.sendResponse(DEST_ID, payload);
    }
/**
     * Verify that a remote channel must be added before sending messages.
     */
Verify that a remote channel must be added before sending messages.
Verify that a remote channel must be added before sending messages .
@Test
    public void testAddRemoteChannel() throws IOException
    {
        m_SUT.setClientId(CLIENT_ID);
        TerraHarvestPayload payload = createPayload();
        try
        {
            m_SUT.sendRequest(DEST_ID, payload);
            fail("sendRequest should throw IllegalArgumentException");
        }
        catch (IllegalArgumentException e)
        {
        }
        try
        {
            m_SUT.sendResponse(DEST_ID, payload);
            fail("sendResponse should throw IllegalArgumentException");
        }
        catch (IllegalArgumentException e)
        {
        }
        m_SUT.addRemoteChannel(DEST_ID, m_OutStream, m_ChannelCallback);
        m_SUT.sendRequest(DEST_ID, payload);
        m_SUT.sendResponse(DEST_ID, payload);
    }
@ Test public void testAddRemoteChannel ( ) throws IOException { m_SUT . setClientId ( CLIENT_ID ) ; TerraHarvestPayload payload = createPayload ( ) ; try { m_SUT . sendRequest ( DEST_ID , payload ) ; fail ( "sendRequest should throw IllegalArgumentException" ) ; } catch ( IllegalArgumentException e ) { } try { m_SUT . sendResponse ( DEST_ID , payload ) ; fail ( "sendResponse should throw IllegalArgumentException" ) ; } catch ( IllegalArgumentException e ) { } m_SUT . addRemoteChannel ( DEST_ID , m_OutStream , m_ChannelCallback ) ; m_SUT . sendRequest ( DEST_ID , payload ) ; m_SUT . sendResponse ( DEST_ID , payload ) ; }
Verify that a remote channel must be added before sending messages.
Verify that a remote channel must be added before sending messages .
// Expected // Expected