com.zenkey.net.prowser
Class RequestTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.zenkey.net.prowser.RequestTestCase
All Implemented Interfaces:
junit.framework.Test

public class RequestTestCase
extends junit.framework.TestCase

The RequestTestCase class contains JUnit tests for the Request class.

The following assumptions are made about the location of the request files used to test the Request class:

Version:
$Revision$, $Date$
Author:
Michael A. Mangino

Constructor Summary
RequestTestCase()
           
 
Method Summary
static void main(java.lang.String[] args)
           
protected  void setUp()
           
static junit.framework.Test suite()
           
protected  void tearDown()
           
 void testAddingAndGettingMultipleParametersViaArray()
          Tests adding and getting multiple parameters (one name and several values) to/from a Request via an array.
 void testAddingAndGettingMultipleParametersViaMap()
          Tests adding and getting multiple parameters (several names with several values) to/from a WebRequset via a Map.
 void testAddingAndGettingSingleParameters()
          Tests adding and getting single parameters to/from a Request.
 void testChangingSingleParameter()
          Tests changing a single parameter with a specified name and value to a new value.
 void testInstantiationViaFile()
          Tests instantiation of a Request via a request file.
 void testInstantiationViaUri()
          Tests instantiation of a Request via a URI argument.
 void testRemovingAllParameters()
          Tests removing all parameters.
 void testRemovingParametersWithSameName()
          Tests removing all parameters with a specified name.
 void testRemovingSingleParameter()
          Tests removing a single parameter with a specified name and value.
 void testSettingMultipleParametersViaArray()
          Tests setting multiple parameters (one name and several values) via an array.
 void testSettingMultipleParametersViaMap()
          Tests setting multiple parameters (one name and several values) via a map.
 void testSettingSingleParameter()
          Tests setting a single parameter with a specified name and value.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 

Constructor Detail

RequestTestCase

public RequestTestCase()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)

suite

public static junit.framework.Test suite()

testInstantiationViaUri

public final void testInstantiationViaUri()
Tests instantiation of a Request via a URI argument. All default request properties should be tested here.


testInstantiationViaFile

public final void testInstantiationViaFile()
                                    throws java.lang.Exception
Tests instantiation of a Request via a request file. See RequestTestCase for info on the required location of the request files used by this method. See Request.Request(File) for info on the allowed content and format of the request files.

Throws:
java.lang.Exception

testAddingAndGettingSingleParameters

public final void testAddingAndGettingSingleParameters()
Tests adding and getting single parameters to/from a Request.


testAddingAndGettingMultipleParametersViaArray

public final void testAddingAndGettingMultipleParametersViaArray()
Tests adding and getting multiple parameters (one name and several values) to/from a Request via an array.


testAddingAndGettingMultipleParametersViaMap

public final void testAddingAndGettingMultipleParametersViaMap()
Tests adding and getting multiple parameters (several names with several values) to/from a WebRequset via a Map.


testChangingSingleParameter

public final void testChangingSingleParameter()
Tests changing a single parameter with a specified name and value to a new value.


testRemovingSingleParameter

public final void testRemovingSingleParameter()
Tests removing a single parameter with a specified name and value.


testRemovingParametersWithSameName

public final void testRemovingParametersWithSameName()
Tests removing all parameters with a specified name.


testRemovingAllParameters

public final void testRemovingAllParameters()
Tests removing all parameters.


testSettingSingleParameter

public final void testSettingSingleParameter()
Tests setting a single parameter with a specified name and value.


testSettingMultipleParametersViaArray

public final void testSettingMultipleParametersViaArray()
Tests setting multiple parameters (one name and several values) via an array.


testSettingMultipleParametersViaMap

public final void testSettingMultipleParametersViaMap()
Tests setting multiple parameters (one name and several values) via a map.