SimpleOptionHandlerTestpublic class SimpleOptionHandlerTest extends TelnetOptionHandlerTestAbstract JUnit test class for SimpleOptionHandler
|
Methods Summary |
---|
public static void | main(java.lang.String[] args)main for running the test.
junit.textui.TestRunner.run(SimpleOptionHandlerTest.class);
| protected void | setUp()setUp for the test.
opthand1 = new SimpleOptionHandler(4);
opthand2 = new SimpleOptionHandler(8, true, true, true, true);
opthand3 = new SimpleOptionHandler(91, false, false, false, false);
| public void | testAnswerSubnegotiation()test of server-driven subnegotiation.
Checks that no subnegotiation is made.
int subn[] =
{
TelnetCommand.IAC, TelnetCommand.SB, 4,
1, TelnetCommand.IAC, TelnetCommand.SE,
};
int resp1[] = opthand1.answerSubnegotiation(subn, subn.length);
assertEquals(resp1, null);
| public void | testConstructors()test of the constructors.
assertEquals(opthand1.getOptionCode(), 4);
assertEquals(opthand2.getOptionCode(), 8);
assertEquals(opthand3.getOptionCode(), 91);
super.testConstructors();
| public void | testStartSubnegotiation()test of client-driven subnegotiation.
Checks that no subnegotiation is made.
int resp1[] = opthand1.startSubnegotiationLocal();
int resp2[] = opthand1.startSubnegotiationRemote();
assertEquals(resp1, null);
assertEquals(resp2, null);
|
|