org.apache.commons.cactus.client
Class TestAutoReadHttpURLConnection

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--org.apache.commons.cactus.client.TestAutoReadHttpURLConnection
All Implemented Interfaces:
junit.framework.Test

public class TestAutoReadHttpURLConnection
extends junit.framework.TestCase

Unit tests of the AutoReadHttpURLConnection class.

Version:
1.1

Constructor Summary
TestAutoReadHttpURLConnection(java.lang.String theName)
          Defines the testcase name for JUnit.
 
Method Summary
static void main(java.lang.String[] theArgs)
          Start the tests.
 void setUp()
          Run prior to each test to create an autoreader of a mock http url connection that returns test data
 void testChunkSizeDivisible()
          Tests where the test data size is exactly divisible by the chunk size
 void testChunkSizeRemainder()
          Tests where the test data size is not exactly divisible by the chunk size
 void testReadFully()
          Tests that the wrapped connection's input stream is automatically read on first call to getInputStream
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, name, run, run, runBare, setName, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestAutoReadHttpURLConnection

public TestAutoReadHttpURLConnection(java.lang.String theName)
Defines the testcase name for JUnit.
Parameters:
theName - the testcase's name.
Method Detail

main

public static void main(java.lang.String[] theArgs)
Start the tests.
Parameters:
theArgs - the arguments. Not used

setUp

public void setUp()
Run prior to each test to create an autoreader of a mock http url connection that returns test data

testReadFully

public void testReadFully()
                   throws java.lang.Exception
Tests that the wrapped connection's input stream is automatically read on first call to getInputStream

testChunkSizeRemainder

public void testChunkSizeRemainder()
                            throws java.lang.Exception
Tests where the test data size is not exactly divisible by the chunk size

testChunkSizeDivisible

public void testChunkSizeDivisible()
                            throws java.lang.Exception
Tests where the test data size is exactly divisible by the chunk size


Copyright © 2000-2001 Apache Software Foundation. All Rights Reserved.