Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cactus.internal
Class AbstractTestSuite

    java.lang.Object
      org.apache.cactus.internal.AbstractTestSuite

All Implemented Interfaces:
  junit.framework.Test

Direct Known Subclasses:
  ServletTestSuite

public abstract class AbstractTestSuite
extends java.lang.Object
implements junit.framework.Test

Test Suite that wraps all the tests of the suite in Cactus Test Case objects so that pure JUnit tests can be run on the server side.

Since:
  1.5
Version:
  $Id: AbstractTestSuite.java 238991 2004-05-22 11:34:50Z vmassol $

Constructor Summary
`AbstractTestSuite()`
`AbstractTestSuite(java.lang.Class theClass)`
`AbstractTestSuite(java.lang.String theName)`

Method Summary
`protected void` | `addTest(junit.framework.Test theTest)`
`protected void` | `addTestSuite(java.lang.Class theTestClass)`
`int` | `countTestCases()`
`protected abstract junit.framework.Test` | `createCactusTestCase(java.lang.String theName, junit.framework.Test theTest)`
`protected abstract junit.framework.Test` | `createTestSuite(java.lang.Class theTestClass)`
`protected java.lang.String` | `getName()`
`protected static java.lang.reflect.Constructor` | `getTestConstructor(java.lang.Class theClass)` Gets a constructor which takes a single String as its argument or a no arg constructor.
`void` | `run(junit.framework.TestResult theResult)`
`protected void` | `runTest(junit.framework.Test theTest, junit.framework.TestResult theResult)`
`protected void` | `setName(java.lang.String theName)`
`protected junit.framework.Test` | `testAt(int theIndex)`
`protected int` | `testCount()`
`protected java.util.Enumeration` | `tests()`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AbstractTestSuite

    public AbstractTestSuite()

See Also:
  `TestSuite.TestSuite()`

### AbstractTestSuite

    public AbstractTestSuite(java.lang.Class theClass)

See Also:
  `TestSuite.TestSuite(Class)`

### AbstractTestSuite

    public AbstractTestSuite(java.lang.String theName)

See Also:
  `TestSuite.TestSuite(String)`

Method Detail

### addTest

    protected void addTest(junit.framework.Test theTest)

  See Also:
    `TestSuite.addTest(Test)`

### addTestSuite

    protected void addTestSuite(java.lang.Class theTestClass)

  See Also:
    `TestSuite.addTestSuite(Class)`

### countTestCases

    public int countTestCases()

  Specified by:
    `countTestCases` in interface `junit.framework.Test`
  See Also:
    `TestSuite.countTestCases()`

### run

    public void run(junit.framework.TestResult theResult)

  Specified by:
    `run` in interface `junit.framework.Test`
  See Also:
    `TestSuite.run(TestResult)`

### runTest

    protected void runTest(junit.framework.Test theTest,
                           junit.framework.TestResult theResult)

  See Also:
    `TestSuite.runTest(Test, TestResult)`

### testAt

    protected junit.framework.Test testAt(int theIndex)

  See Also:
    `TestSuite.testAt(int)`

### getTestConstructor

    protected static java.lang.reflect.Constructor getTestConstructor(java.lang.Class theClass)
                                                               throws java.lang.NoSuchMethodException

  Gets a constructor which takes a single String as its argument or a no arg constructor.

  Parameters:
    `theClass` - the class for which to find the constructor
  Returns:
    the valid constructor found
  Throws:
    `java.lang.NoSuchMethodException` - if no valid constructor is found

### testCount

    protected int testCount()

  See Also:
    `TestSuite.testCount()`

### tests

    protected java.util.Enumeration tests()

  See Also:
    `TestSuite.tests()`

### toString

    public java.lang.String toString()

  See Also:
    `TestSuite.toString()`

### setName

    protected void setName(java.lang.String theName)

  See Also:
    `TestSuite.setName(String)`

### getName

    protected java.lang.String getName()

  See Also:
    `TestSuite.getName()`

### createTestSuite

    protected abstract junit.framework.Test createTestSuite(java.lang.Class theTestClass)

  Parameters:
    `theTestClass` - the test class containing the tests to be included in the Cactus Test Suite
  Returns:
    a Cactus Test Suite (ex: ServletTestSuite) initialized with a test class

### createCactusTestCase

    protected abstract junit.framework.Test createCactusTestCase(java.lang.String theName,
                                                                 junit.framework.Test theTest)

  Parameters:
    `theName` - the name of the Cactus Test Case
    `theTest` - the wrapped test
  Returns:
    a Cactus Test Case object initialized with the give name and wrapped test

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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