FileDocCategorySizeDatePackage
TelnetOptionTest.javaAPI DocApache Commons NET 1.4.1 API1612Sat Dec 03 10:05:50 GMT 2005org.apache.commons.net.telnet

TelnetOptionTest

public class TelnetOptionTest extends TestCase
JUnit test class for TelnetOption

author
Bruno D'Avanzo

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)
main for running the test.

        junit.textui.TestRunner.run(TelnetOptionTest.class);
    
public voidtestGetOption()
test of the getOption method.

        assertEquals(TelnetOption.getOption(0), "BINARY");
        assertEquals(TelnetOption.getOption(91), "UNASSIGNED");
        assertEquals(TelnetOption.getOption(255), "Extended-Options-List");
    
public voidtestisValidOption()
test of the isValidOption method.

        assertTrue(TelnetOption.isValidOption(0));
        assertTrue(TelnetOption.isValidOption(91));
        assertTrue(TelnetOption.isValidOption(255));
        assertTrue(!TelnetOption.isValidOption(256));