com.diasparsoftware.util.junit
Class ParameterizedTestSuite

java.lang.Object
  extended byjunit.framework.TestSuite
      extended bycom.diasparsoftware.util.junit.ParameterizedTestSuite
All Implemented Interfaces:
junit.framework.Test

public class ParameterizedTestSuite
extends junit.framework.TestSuite

Create a parameterized test suite from a collection of fixture objects. Each fixture object is an instance of the test case for which you wish to provide external fixture data. Use "fixturable" test case classes: a test case class with an additional constructor capable of accepting as parameters all the fixture data the test needs. To use a parameterized test suite, follow these instructions.

  1. Add a constructor to accept your fixture data.
  2. Implement setFixture().
  3. Override getName() to include the name of your fixture.


Constructor Summary
ParameterizedTestSuite(java.util.Collection fixtures)
          Creates a test suite of fixtured test cases from the specified fixtures.
 
Methods inherited from class junit.framework.TestSuite
addTest, addTestSuite, countTestCases, createTest, getName, getTestConstructor, run, runTest, setName, testAt, testCount, tests, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParameterizedTestSuite

public ParameterizedTestSuite(java.util.Collection fixtures)
Creates a test suite of fixtured test cases from the specified fixtures. Each fixtures must be an instance of "fixturable" TestCase. A test case class is fixturable if it defines the method setFixture() taking as a parameter an instance of itself.

Parameters:
fixtures -


Copyright © 2003-2004 Diaspar Software Services, Inc.. All Rights Reserved.