public class NbTestSuite extends junit.framework.TestSuite implements NbTest
Constructor and Description |
---|
NbTestSuite()
Constructs an empty TestSuite.
|
NbTestSuite(Class<? extends junit.framework.TestCase> theClass)
Constructs a TestSuite from the given class.
|
NbTestSuite(String name)
Constructs an empty TestSuite.
|
Modifier and Type | Method and Description |
---|---|
void |
addTest(junit.framework.Test test)
Adds a test to the suite.
|
void |
addTestSuite(Class<? extends junit.framework.TestCase> testClass)
adds a test suite to this test suite
|
boolean |
canRun()
Checks if a test isn't filtered out by the active filter.
|
String |
getExpectedFail()
Returns expected fail message.
|
static NbTestSuite |
linearSpeedSuite(Class<? extends junit.framework.TestCase> clazz,
int slowness,
int repeat)
Factory method to create a special execution suite that not only
executes the tests but also measures the times each execution took.
|
void |
setFilter(Filter filter)
Sets active filter.
|
static NbTestSuite |
speedSuite(Class<? extends junit.framework.TestCase> clazz,
int slowness,
int repeat)
Factory method to create a special execution suite that not only
executes the tests but also measures the times each execution took.
|
countTestCases, createTest, getName, getTestConstructor, run, runTest, setName, testAt, testCount, tests, toString, warning
public NbTestSuite()
public NbTestSuite(Class<? extends junit.framework.TestCase> theClass)
theClass
- the class to create tests for (from methods starting with test)public NbTestSuite(String name)
name
- name of the test suitepublic void addTest(junit.framework.Test test)
addTest
in class junit.framework.TestSuite
public void addTestSuite(Class<? extends junit.framework.TestCase> testClass)
addTestSuite
in class junit.framework.TestSuite
public void setFilter(Filter filter)
public boolean canRun()
public String getExpectedFail()
NbTest
getExpectedFail
in interface NbTest
public static NbTestSuite speedSuite(Class<? extends junit.framework.TestCase> clazz, int slowness, int repeat)
clazz
- the class to create tests for (from methods starting with test)slowness
- this must be true: slowness * min < maxrepeat
- number of times to repeat the testpublic static NbTestSuite linearSpeedSuite(Class<? extends junit.framework.TestCase> clazz, int slowness, int repeat)
clazz
- the class to create tests for (from methods starting with test)slowness
- this must be true: slowness * min < maxrepeat
- number of times to repeat the test