mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/channel/TestChannelMgrImpl.java
@Test
    public void testGetAllSocketChannels()
    {
        Set<RemoteChannel> setChans = new HashSet<RemoteChannel>();
        setChans.add(createMockSocketChannel("localhost", 4444, ChannelStatus.Unknown));
        setChans.add(createMockTransportChannel("transportName", "localAddr", "remoteAddr", ChannelStatus.Unknown));
        
        Map<Integer, Set<RemoteChannel>> channels = new HashMap<Integer, Set<RemoteChannel>>();
        channels.put(1957, setChans);
        when(m_RemoteChannelLookup.getAllChannels()).thenReturn(channels);
        
        List<SocketChannelModel> sockets = m_SUT.getAllSocketChannels();
        
        assertThat(sockets, notNullValue());
        assertThat(sockets.size(), is(1));
    }
/**
     * Verify that the correct socket channels are returned.
     */
Verify that the correct socket channels are returned.
Verify that the correct socket channels are returned .
@Test
    public void testGetAllSocketChannels()
    {
        Set<RemoteChannel> setChans = new HashSet<RemoteChannel>();
        setChans.add(createMockSocketChannel("localhost", 4444, ChannelStatus.Unknown));
        setChans.add(createMockTransportChannel("transportName", "localAddr", "remoteAddr", ChannelStatus.Unknown));
        Map<Integer, Set<RemoteChannel>> channels = new HashMap<Integer, Set<RemoteChannel>>();
        channels.put(1957, setChans);
        when(m_RemoteChannelLookup.getAllChannels()).thenReturn(channels);
        List<SocketChannelModel> sockets = m_SUT.getAllSocketChannels();
        assertThat(sockets, notNullValue());
        assertThat(sockets.size(), is(1));
    }
@ Test public void testGetAllSocketChannels ( ) { Set < RemoteChannel > setChans = new HashSet < RemoteChannel > ( ) ; setChans . add ( createMockSocketChannel ( "localhost" , 4444 , ChannelStatus . Unknown ) ) ; setChans . add ( createMockTransportChannel ( "transportName" , "localAddr" , "remoteAddr" , ChannelStatus . Unknown ) ) ; Map < Integer , Set < RemoteChannel > > channels = new HashMap < Integer , Set < RemoteChannel > > ( ) ; channels . put ( 1957 , setChans ) ; when ( m_RemoteChannelLookup . getAllChannels ( ) ) . thenReturn ( channels ) ; List < SocketChannelModel > sockets = m_SUT . getAllSocketChannels ( ) ; assertThat ( sockets , notNullValue ( ) ) ; assertThat ( sockets . size ( ) , is ( 1 ) ) ; }
Verify that the correct socket channels are returned.
Verify that the correct socket channels are returned .