main for running the test. junit.textui.TestRunner.run(TelnetOptionTest.class);
junit.textui.TestRunner.run(TelnetOptionTest.class);
test of the getOption method. assertEquals(TelnetOption.getOption(0), "BINARY"); assertEquals(TelnetOption.getOption(91), "UNASSIGNED"); assertEquals(TelnetOption.getOption(255), "Extended-Options-List");
assertEquals(TelnetOption.getOption(0), "BINARY"); assertEquals(TelnetOption.getOption(91), "UNASSIGNED"); assertEquals(TelnetOption.getOption(255), "Extended-Options-List");
test of the isValidOption method. assertTrue(TelnetOption.isValidOption(0)); assertTrue(TelnetOption.isValidOption(91)); assertTrue(TelnetOption.isValidOption(255)); assertTrue(!TelnetOption.isValidOption(256));
assertTrue(TelnetOption.isValidOption(0)); assertTrue(TelnetOption.isValidOption(91)); assertTrue(TelnetOption.isValidOption(255)); assertTrue(!TelnetOption.isValidOption(256));