Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.commons.net.telnet
Class TelnetClientFunctionalTest  view TelnetClientFunctionalTest download TelnetClientFunctionalTest.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.commons.net.telnet.TelnetClientFunctionalTest
All Implemented Interfaces:
junit.framework.Test

public class TelnetClientFunctionalTest
extends junit.framework.TestCase

JUnit functional test for TelnetClient. Connects to the weather forecast service rainmaker.wunderground.com and asks for Los Angeles forecast.


Field Summary
protected  TelnetClient tc1
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
TelnetClientFunctionalTest()
           
 
Method Summary
static void main(java.lang.String[] args)
          main for running the test.
protected  void setUp()
          test setUp
 void testFunctionalTest()
          Do the functional test: - connect to the weather service - press return on the first menu - send LAX on the second menu - send X to exit
 boolean waitForString(java.io.InputStream is, java.lang.String end, long timeout)
          Helper method.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
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, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tc1

protected TelnetClient tc1
Constructor Detail

TelnetClientFunctionalTest

public TelnetClientFunctionalTest()
Method Detail

main

public static void main(java.lang.String[] args)
main for running the test.


setUp

protected void setUp()
test setUp


testFunctionalTest

public void testFunctionalTest()
                        throws java.lang.Exception
Do the functional test: - connect to the weather service - press return on the first menu - send LAX on the second menu - send X to exit


waitForString

public boolean waitForString(java.io.InputStream is,
                             java.lang.String end,
                             long timeout)
                      throws java.lang.Exception
Helper method. waits for a string with timeout