org.apache.cactus
Class TestAbstractTestCase

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--org.apache.cactus.AbstractTestCase
                    |
                    +--org.apache.cactus.TestAbstractTestCase_InterceptorTestCase
                          |
                          +--org.apache.cactus.TestAbstractTestCase
All Implemented Interfaces:
junit.framework.Test

public class TestAbstractTestCase
extends TestAbstractTestCase_InterceptorTestCase

Unit tests of the AbstractTestCase class.

Version:
$Id: TestAbstractTestCase.java,v 1.4 2001/09/14 20:26:12 pier Exp $
Author:
Vincent Massol

Fields inherited from class org.apache.cactus.AbstractTestCase
currentTestMethod
 
Constructor Summary
TestAbstractTestCase(java.lang.String theName)
          Defines the testcase name for JUnit.
 
Method Summary
 void beginBeginMethodBadParamNumber(WebRequest theRequest, java.lang.String theString)
          Test that when a begin method for a given test has the wrong number of parameters, a AssertionFailedError exception is returned.
 void beginBeginMethodBadParamType(java.lang.String theDummy)
          Test that when a begin method for a given test has the wrong type of parameters, a AssertionFailedError exception is returned.
 java.lang.String beginBeginMethodBadReturnType(WebRequest theRequest)
          Test that when a begin method for a given test does not have the correct return type (i.e. void), a AssertionFailedError exception is returned.
 void beginBeginMethodOK1(ServletTestRequest theRequest)
          Verify that the deprecated begin method with a ServletTestRequest parameter is still supported.
 void beginBeginMethodOK2(WebRequest theRequest)
          Verify that the begin method with a WebRequest parameter is called correctly.
 void endEndMethodBadParamNumber(WebResponse theResponse, java.lang.String theDummy)
          Test that when an end method for a given test has the wrong number of parameters, a AssertionFailedError exception is returned.
 void endEndMethodBadParamType(java.lang.String theDummy)
          Test that when an end method for a given test has the wrong type of parameters, a AssertionFailedError exception is returned.
 java.lang.String endEndMethodBadReturnType(WebResponse theResponse)
          Test that when an end method for a given test does not have the correct return type (i.e. void), a AssertionFailedError exception is returned.
 void endEndMethodOK1(WebResponse theResponse)
          Test that the end method is called correctly when it's signature contains a org.apache.cactus.WebResponse parameter.
 void endEndMethodOK2(com.meterware.httpunit.WebResponse theResponse)
          Test that the end method is called correctly when it's signature contains a com.meterware.httpunit.WebResponse parameter.
 void endEndMethodOK3(java.net.HttpURLConnection theResponse)
          Test that the deprecated end method with the HttpURLConnection parameter can still be called correctly.
static void main(java.lang.String[] theArgs)
          Start the tests.
static junit.framework.Test suite()
           
 void testBeginMethodBadParamNumber()
          Test that when a begin method for a given test has the wrong number of parameters, a AssertionFailedError exception is returned.
 void testBeginMethodBadParamType()
          Test that when a begin method for a given test has the wrong type of parameters, a AssertionFailedError exception is returned.
 void testBeginMethodBadReturnType()
          Test that when a begin method for a given test does not have the correct return type (i.e. void), a AssertionFailedError exception is returned.
 void testBeginMethodNotPublic()
          Test that when a begin method for a given test is not declared public a AssertionFailedError exception is returned.
 void testBeginMethodOK1()
          Verify that the deprecated begin method with a ServletTestRequest parameter is still supported.
 void testBeginMethodOK2()
          Verify that the begin method with a WebRequest parameter is called correctly.
 void testEndMethodBadParamNumber()
          Test that when an end method for a given test has the wrong number of parameters, a AssertionFailedError exception is returned.
 void testEndMethodBadParamType()
          Test that when an end method for a given test has the wrong type of parameters, a AssertionFailedError exception is returned.
 void testEndMethodBadReturnType()
          Test that when an end method for a given test does not have the correct return type (i.e. void), a AssertionFailedError exception is returned.
 void testEndMethodNotPublic()
          Test that when an end method for a given test is not declared public a AssertionFailedError exception is returned.
 void testEndMethodOK1()
          Test that the end method is called correctly when it's signature contains a org.apache.cactus.WebResponse parameter.
 void testEndMethodOK2()
          Test that the end method is called correctly when it's signature contains a com.meterware.httpunit.WebResponse parameter.
 void testEndMethodOK3()
          Test that the deprecated end method with the HttpURLConnection parameter can still be called correctly.
 
Methods inherited from class org.apache.cactus.AbstractTestCase
runBare, runBareServerTest
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, name, run, run, 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

TestAbstractTestCase

public TestAbstractTestCase(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

suite

public static junit.framework.Test suite()
Returns:
a test suite (TestSuite) that includes all methods starting with "test"

beginBeginMethodBadReturnType

public java.lang.String beginBeginMethodBadReturnType(WebRequest theRequest)
Test that when a begin method for a given test does not have the correct return type (i.e. void), a AssertionFailedError exception is returned. Note: the assert is done in the TestAbstractTestCase_InterceptorTestCase class.

testBeginMethodBadReturnType

public void testBeginMethodBadReturnType()
Test that when a begin method for a given test does not have the correct return type (i.e. void), a AssertionFailedError exception is returned. Note: the assert is done in the TestAbstractTestCase_InterceptorTestCase class.

testBeginMethodNotPublic

public void testBeginMethodNotPublic()
Test that when a begin method for a given test is not declared public a AssertionFailedError exception is returned. Note: the assert is done in the TestAbstractTestCase_InterceptorTestCase class.

beginBeginMethodBadParamType

public void beginBeginMethodBadParamType(java.lang.String theDummy)
Test that when a begin method for a given test has the wrong type of parameters, a AssertionFailedError exception is returned. Note: the assert is done in the TestAbstractTestCase_InterceptorTestCase class.

testBeginMethodBadParamType

public void testBeginMethodBadParamType()
Test that when a begin method for a given test has the wrong type of parameters, a AssertionFailedError exception is returned. Note: the assert is done in the TestAbstractTestCase_InterceptorTestCase class.

beginBeginMethodBadParamNumber

public void beginBeginMethodBadParamNumber(WebRequest theRequest,
                                           java.lang.String theString)
Test that when a begin method for a given test has the wrong number of parameters, a AssertionFailedError exception is returned. Note: the assert is done in the TestAbstractTestCase_InterceptorTestCase class.

testBeginMethodBadParamNumber

public void testBeginMethodBadParamNumber()
Test that when a begin method for a given test has the wrong number of parameters, a AssertionFailedError exception is returned. Note: the assert is done in the TestAbstractTestCase_InterceptorTestCase class.

beginBeginMethodOK1

public void beginBeginMethodOK1(ServletTestRequest theRequest)
Verify that the deprecated begin method with a ServletTestRequest parameter is still supported.

testBeginMethodOK1

public void testBeginMethodOK1()
Verify that the deprecated begin method with a ServletTestRequest parameter is still supported.

beginBeginMethodOK2

public void beginBeginMethodOK2(WebRequest theRequest)
Verify that the begin method with a WebRequest parameter is called correctly.

testBeginMethodOK2

public void testBeginMethodOK2()
Verify that the begin method with a WebRequest parameter is called correctly.

testEndMethodBadReturnType

public void testEndMethodBadReturnType()
Test that when an end method for a given test does not have the correct return type (i.e. void), a AssertionFailedError exception is returned. Note: the assert is done in the TestAbstractTestCase_InterceptorTestCase class.

endEndMethodBadReturnType

public java.lang.String endEndMethodBadReturnType(WebResponse theResponse)
Test that when an end method for a given test does not have the correct return type (i.e. void), a AssertionFailedError exception is returned. Note: the assert is done in the TestAbstractTestCase_InterceptorTestCase class.

testEndMethodNotPublic

public void testEndMethodNotPublic()
Test that when an end method for a given test is not declared public a AssertionFailedError exception is returned. Note: the assert is done in the TestAbstractTestCase_InterceptorTestCase class.

testEndMethodBadParamType

public void testEndMethodBadParamType()
Test that when an end method for a given test has the wrong type of parameters, a AssertionFailedError exception is returned. Note: the assert is done in the TestAbstractTestCase_InterceptorTestCase class.

endEndMethodBadParamType

public void endEndMethodBadParamType(java.lang.String theDummy)
Test that when an end method for a given test has the wrong type of parameters, a AssertionFailedError exception is returned. Note: the assert is done in the TestAbstractTestCase_InterceptorTestCase class.

testEndMethodBadParamNumber

public void testEndMethodBadParamNumber()
Test that when an end method for a given test has the wrong number of parameters, a AssertionFailedError exception is returned. Note: the assert is done in the TestAbstractTestCase_InterceptorTestCase class.

endEndMethodBadParamNumber

public void endEndMethodBadParamNumber(WebResponse theResponse,
                                       java.lang.String theDummy)
Test that when an end method for a given test has the wrong number of parameters, a AssertionFailedError exception is returned. Note: the assert is done in the TestAbstractTestCase_InterceptorTestCase class.

testEndMethodOK1

public void testEndMethodOK1()
Test that the end method is called correctly when it's signature contains a org.apache.cactus.WebResponse parameter.

endEndMethodOK1

public void endEndMethodOK1(WebResponse theResponse)
Test that the end method is called correctly when it's signature contains a org.apache.cactus.WebResponse parameter.

testEndMethodOK2

public void testEndMethodOK2()
Test that the end method is called correctly when it's signature contains a com.meterware.httpunit.WebResponse parameter. Note: We need the Httpunit jar and an XML parser jar on the classpath for this test

endEndMethodOK2

public void endEndMethodOK2(com.meterware.httpunit.WebResponse theResponse)
Test that the end method is called correctly when it's signature contains a com.meterware.httpunit.WebResponse parameter. Note: We need the Httpunit jar and an XML parser jar on the classpath for this test

testEndMethodOK3

public void testEndMethodOK3()
Test that the deprecated end method with the HttpURLConnection parameter can still be called correctly.

endEndMethodOK3

public void endEndMethodOK3(java.net.HttpURLConnection theResponse)
Test that the deprecated end method with the HttpURLConnection parameter can still be called correctly.


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