FileDocCategorySizeDatePackage
SuppressGAOptionHandlerTest.javaAPI DocApache Commons NET 1.4.1 API2320Sat Dec 03 10:05:48 GMT 2005org.apache.commons.net.telnet

SuppressGAOptionHandlerTest

public class SuppressGAOptionHandlerTest extends TelnetOptionHandlerTestAbstract
JUnit test class for SuppressGAOptionHandler

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(SuppressGAOptionHandlerTest.class);
    
protected voidsetUp()
setUp for the test.

        opthand1 = new SuppressGAOptionHandler();
        opthand2 = new SuppressGAOptionHandler(true, true, true, true);
        opthand3 = new SuppressGAOptionHandler(false, false, false, false);
    
public voidtestAnswerSubnegotiation()
test of server-driven subnegotiation. Checks that no subnegotiation is made.

        int subn[] =
        {
            TelnetCommand.IAC, TelnetCommand.SB, TelnetOption.SUPPRESS_GO_AHEAD,
            1, TelnetCommand.IAC, TelnetCommand.SE,
        };

        int resp1[] = opthand1.answerSubnegotiation(subn, subn.length);

        assertEquals(resp1, null);
    
public voidtestConstructors()
test of the constructors.

        assertEquals(opthand1.getOptionCode(), TelnetOption.SUPPRESS_GO_AHEAD);
        super.testConstructors();
    
public voidtestStartSubnegotiation()
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);