org.apache.jdo.tck.util
Class TestListSuite

java.lang.Object
  extended byjunit.framework.TestSuite
      extended byorg.apache.jdo.tck.util.TestListSuite
All Implemented Interfaces:
junit.framework.Test, junit.runner.TestCollector

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

This class implements a test suite including all test cases as specified in a testlist file. The user can specify the name of the testlist by setting the system property testlist. The default is JDOTCKTestCases.list. The swing GUI uses this class when browsing all test classes.

Author:
Michael Bouschen

Field Summary
static java.lang.String TESTLIST_DEFAULT
          Default of the system property testlist.
static java.lang.String TESTLIST_PROPERTY
          Name of the system property to specify the list of test class names.
 
Constructor Summary
TestListSuite()
          No arg constructor used by the swing GUI when browsing the test classes via the TestCollector interface.
TestListSuite(java.lang.String name)
          Creates a test suite with the specified name and reads the test class names fom a file specified by a system property.
TestListSuite(java.lang.String name, java.util.List classNames)
          Creates a test suite with the specified name including the test classes from the specified list.
 
Method Summary
 java.util.Enumeration collectTests()
          Returns an enumeration of Strings with qualified class names.
protected  java.util.List getTestClassNames()
          Returns a list of fully qualified test class names.
protected  java.io.BufferedReader getTestListReader(java.lang.String testlist)
          Returns a BufferedReader for the specified testlist filename.
protected  boolean isTestClassName(java.lang.String line)
          Returns true if the specified String defines a test class name.
static void main(java.lang.String[] args)
          Runs this test suite in batch mode.
static junit.framework.Test suite()
           
 
Methods inherited from class junit.framework.TestSuite
addTest, addTestSuite, countTestCases, createTest, getName, getTestConstructor, run, runTest, setName, testAt, testCount, tests, toString, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TESTLIST_PROPERTY

public static final java.lang.String TESTLIST_PROPERTY
Name of the system property to specify the list of test class names.

See Also:
Constant Field Values

TESTLIST_DEFAULT

public static final java.lang.String TESTLIST_DEFAULT
Default of the system property testlist.

See Also:
Constant Field Values
Constructor Detail

TestListSuite

public TestListSuite()
No arg constructor used by the swing GUI when browsing the test classes via the TestCollector interface.


TestListSuite

public TestListSuite(java.lang.String name)
Creates a test suite with the specified name and reads the test class names fom a file specified by a system property.


TestListSuite

public TestListSuite(java.lang.String name,
                     java.util.List classNames)
Creates a test suite with the specified name including the test classes from the specified list.

Method Detail

main

public static void main(java.lang.String[] args)
Runs this test suite in batch mode.


suite

public static junit.framework.Test suite()

collectTests

public java.util.Enumeration collectTests()
Returns an enumeration of Strings with qualified class names. Method defined in the JUnit interface TestCollector.

Specified by:
collectTests in interface junit.runner.TestCollector

getTestClassNames

protected java.util.List getTestClassNames()
Returns a list of fully qualified test class names. The method checks the system property testlist for the name of the test list (default is JDOTCKTestCases.list). Each line of the file is expected to be the fully qualified class name of a test class. Line starting with a # are skipped.


getTestListReader

protected java.io.BufferedReader getTestListReader(java.lang.String testlist)
                                            throws java.io.FileNotFoundException
Returns a BufferedReader for the specified testlist filename.

Throws:
java.io.FileNotFoundException

isTestClassName

protected boolean isTestClassName(java.lang.String line)
Returns true if the specified String defines a test class name.



Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.