org.ourgrid.test
Class SelectiveTestCollector

java.lang.Object
  extended by junit.framework.TestSuite
      extended by org.ourgrid.test.SelectiveTestCollector
All Implemented Interfaces:
junit.framework.Test, junit.runner.TestCollector

public class SelectiveTestCollector
extends junit.framework.TestSuite
implements junit.runner.TestCollector

Description: Creates a test suite composed of tests of a specified type.

Version:
1.0 Created on 05/07/2004

Constructor Summary
SelectiveTestCollector(java.lang.Class selectiveTestType)
          Creates a new SelectiveTestCollector with a test type to collect.
SelectiveTestCollector(java.lang.Class selectiveTestType, java.lang.String basedir)
          Creates a new SelectiveTestCollector with a test type to collect and a basedir to search.
 
Method Summary
 java.util.Enumeration collectTests()
          Returns a enumeration with all tests of the type selectiveTestType that where found inside the basedir and all it's sub-dirs
protected  boolean isSpecialTestCase(java.lang.Class testClass)
          Informs if a specified test class is an expecial care test.
 
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

SelectiveTestCollector

public SelectiveTestCollector(java.lang.Class selectiveTestType)
Creates a new SelectiveTestCollector with a test type to collect. It uses the $mygrid.output.dir as basedir to search.

Parameters:
selectiveTestType - Type of tests that should be collected

SelectiveTestCollector

public SelectiveTestCollector(java.lang.Class selectiveTestType,
                              java.lang.String basedir)
Creates a new SelectiveTestCollector with a test type to collect and a basedir to search.

Parameters:
selectiveTestType - Type of tests that should be collected
basedir - Basedir to search for test classes.
Method Detail

collectTests

public java.util.Enumeration collectTests()
Returns a enumeration with all tests of the type selectiveTestType that where found inside the basedir and all it's sub-dirs

Specified by:
collectTests in interface junit.runner.TestCollector
Returns:
Enumeration that matches with requirements

isSpecialTestCase

protected boolean isSpecialTestCase(java.lang.Class testClass)
Informs if a specified test class is an expecial care test.

Parameters:
testClass - The class to be tested
Returns:
True if this testclass is a special test case, false otherwise.