org.apache.commons.net.telnet
Class TelnetOptionHandlerTestAbstract

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.net.telnet.TelnetOptionHandlerTestAbstract
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
EchoOptionHandlerTest, SimpleOptionHandlerTest, SuppressGAOptionHandlerTest, TerminalTypeOptionHandlerTest, WindowSizeOptionHandlerTest

public abstract class TelnetOptionHandlerTestAbstract
extends junit.framework.TestCase

The TelnetOptionHandlerTest is the abstract class for testing TelnetOptionHandler. It can be used to derive the actual test classes for TelnetOptionHadler derived classes, by adding creation of three new option handlers and testing of the specific subnegotiation behaviour.

Author:
Bruno D'Avanzo

Constructor Summary
TelnetOptionHandlerTestAbstract()
           
 
Method Summary
protected abstract  void setUp()
          setUp for the test.
abstract  void testAnswerSubnegotiation()
          test of server-driven subnegotiation.
 void testConstructors()
          test of the constructors.
 void testDo()
          test of setDo/getDo
abstract  void testStartSubnegotiation()
          test of client-driven subnegotiation.
 void testWill()
          test of setWill/getWill
 
Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TelnetOptionHandlerTestAbstract

public TelnetOptionHandlerTestAbstract()
Method Detail

setUp

protected abstract void setUp()
setUp for the test. The derived test class must implement this method by creating opthand1, opthand2, opthand3 like in the following: opthand1 = new EchoOptionHandler(); opthand2 = new EchoOptionHandler(true, true, true, true); opthand3 = new EchoOptionHandler(false, false, false, false);

Overrides:
setUp in class junit.framework.TestCase

testConstructors

public void testConstructors()
test of the constructors. The derived class may add test of the option code.


testWill

public void testWill()
test of setWill/getWill


testDo

public void testDo()
test of setDo/getDo


testStartSubnegotiation

public abstract void testStartSubnegotiation()
test of client-driven subnegotiation. Abstract test: the derived class should implement it.


testAnswerSubnegotiation

public abstract void testAnswerSubnegotiation()
test of server-driven subnegotiation. Abstract test: the derived class should implement it.



Copyright © 2001-2014 The Apache Software Foundation. All Rights Reserved.