mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/channel/TestChannelGuiDialogHelper.java
@Test
    public void testSetSelectedNewChannelType()
    {
        NewChannelChoice choice = mock(NewChannelChoice.class);
        when(choice.getChannelName()).thenReturn("Socket");
        when(choice.getChannelType()).thenReturn(RemoteChannelTypeEnum.SOCKET);
        
        m_SUT.setSelectedNewChannelType(choice);
        
        assertThat(m_SUT.getSelectedNewChannelType(), is(RemoteChannelTypeEnum.SOCKET));
        
        NewChannelChoice tchoice = mock(NewChannelChoice.class);
        when(tchoice.getChannelName()).thenReturn("ReallyAwesomeTransport");
        when(tchoice.getChannelType()).thenReturn(RemoteChannelTypeEnum.TRANSPORT);
        
        m_SUT.setSelectedNewChannelType(tchoice);
        
        assertThat(m_SUT.getSelectedNewChannelType(), is(RemoteChannelTypeEnum.TRANSPORT));
        assertThat(m_SUT.getNewTransportName(), is("ReallyAwesomeTransport"));
    }
/**
     * Verify selected new channel type sets selected channel type variable
     * 
     * Verify if set to transport then transport name is the name of the choice.
     */
Verify selected new channel type sets selected channel type variable

Verify if set to transport then transport name is the name of the choice.
Verify selected new channel type sets selected channel type variable Verify if set to transport then transport name is the name of the choice .
@Test
    public void testSetSelectedNewChannelType()
    {
        NewChannelChoice choice = mock(NewChannelChoice.class);
        when(choice.getChannelName()).thenReturn("Socket");
        when(choice.getChannelType()).thenReturn(RemoteChannelTypeEnum.SOCKET);
        m_SUT.setSelectedNewChannelType(choice);
        assertThat(m_SUT.getSelectedNewChannelType(), is(RemoteChannelTypeEnum.SOCKET));
        NewChannelChoice tchoice = mock(NewChannelChoice.class);
        when(tchoice.getChannelName()).thenReturn("ReallyAwesomeTransport");
        when(tchoice.getChannelType()).thenReturn(RemoteChannelTypeEnum.TRANSPORT);
        m_SUT.setSelectedNewChannelType(tchoice);
        assertThat(m_SUT.getSelectedNewChannelType(), is(RemoteChannelTypeEnum.TRANSPORT));
        assertThat(m_SUT.getNewTransportName(), is("ReallyAwesomeTransport"));
    }
@ Test public void testSetSelectedNewChannelType ( ) { NewChannelChoice choice = mock ( NewChannelChoice . class ) ; when ( choice . getChannelName ( ) ) . thenReturn ( "Socket" ) ; when ( choice . getChannelType ( ) ) . thenReturn ( RemoteChannelTypeEnum . SOCKET ) ; m_SUT . setSelectedNewChannelType ( choice ) ; assertThat ( m_SUT . getSelectedNewChannelType ( ) , is ( RemoteChannelTypeEnum . SOCKET ) ) ; NewChannelChoice tchoice = mock ( NewChannelChoice . class ) ; when ( tchoice . getChannelName ( ) ) . thenReturn ( "ReallyAwesomeTransport" ) ; when ( tchoice . getChannelType ( ) ) . thenReturn ( RemoteChannelTypeEnum . TRANSPORT ) ; m_SUT . setSelectedNewChannelType ( tchoice ) ; assertThat ( m_SUT . getSelectedNewChannelType ( ) , is ( RemoteChannelTypeEnum . TRANSPORT ) ) ; assertThat ( m_SUT . getNewTransportName ( ) , is ( "ReallyAwesomeTransport" ) ) ; }
Verify selected new channel type sets selected channel type variable
Verify selected new channel type sets selected channel type variable