org.netbeans.junit
Class NbTestSuite

java.lang.Object
  |
  +--junit.framework.TestSuite
        |
        +--org.netbeans.junit.NbTestSuite
All Implemented Interfaces:
NbTest, junit.framework.Test

public class NbTestSuite
extends junit.framework.TestSuite
implements NbTest

NetBeans extension to JUnit's TestSuite class.


Constructor Summary
NbTestSuite()
          Constructs an empty TestSuite.
NbTestSuite(java.lang.Class theClass)
          Constructs a TestSuite from the given class.
NbTestSuite(java.lang.String name)
          Constructs an empty TestSuite.
 
Method Summary
 void addTest(junit.framework.Test test)
          Adds a test to the suite.
 void addTestSuite(java.lang.Class testClass)
          adds a test suite to this test suite
 boolean canRun()
          Checks if a test isn't filtered out by the active filter.
 void setFilter(Filter filter)
          Sets active filter.
 
Methods inherited from class junit.framework.TestSuite
countTestCases, getName, run, runTest, setName, testAt, testCount, tests, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface junit.framework.Test
countTestCases, run
 

Constructor Detail

NbTestSuite

public NbTestSuite()
Constructs an empty TestSuite.


NbTestSuite

public NbTestSuite(java.lang.Class theClass)
Constructs a TestSuite from the given class. Adds all the methods starting with "test" as test cases to the suite.


NbTestSuite

public NbTestSuite(java.lang.String name)
Constructs an empty TestSuite.

Method Detail

addTest

public void addTest(junit.framework.Test test)
Adds a test to the suite.

Overrides:
addTest in class junit.framework.TestSuite

addTestSuite

public void addTestSuite(java.lang.Class testClass)
adds a test suite to this test suite

Overrides:
addTestSuite in class junit.framework.TestSuite

setFilter

public void setFilter(Filter filter)
Sets active filter.

Specified by:
setFilter in interface NbTest
Parameters:
filter - Filter to be set as active for current test, null will reset filtering.

canRun

public boolean canRun()
Checks if a test isn't filtered out by the active filter.

Specified by:
canRun in interface NbTest
Returns:
true if the test can run