1 16 package org.apache.commons.net.telnet; 17 18 import junit.framework.TestCase; 19 20 25 public class TelnetOptionTest extends TestCase 26 { 27 30 public static void main(String args[]) 31 { 32 junit.textui.TestRunner.run(TelnetOptionTest.class); 33 } 34 35 38 public void testisValidOption() 39 { 40 assertTrue(TelnetOption.isValidOption(0)); 41 assertTrue(TelnetOption.isValidOption(91)); 42 assertTrue(TelnetOption.isValidOption(255)); 43 assertTrue(!TelnetOption.isValidOption(256)); 44 } 45 46 49 public void testGetOption() 50 { 51 assertEquals(TelnetOption.getOption(0), "BINARY"); 52 assertEquals(TelnetOption.getOption(91), "UNASSIGNED"); 53 assertEquals(TelnetOption.getOption(255), "Extended-Options-List"); 54 } 55 } | Popular Tags |