public class NbModuleSuite extends Object
public class YourTest extends NbTestCase { public YourTest(String s) { super(s); } public static Test suite() { return NbModuleSuite.create(YourTest.class); } public void testXYZ() { ... } public void testABC() { ... } }For more advanced configuration see
NbModuleSuite.emptyConfiguration()
and NbModuleSuite.Configuration
.Modifier and Type | Class and Description |
---|---|
static class |
NbModuleSuite.Configuration
Settings object that allows one to configure execution of
whole
NbModuleSuite . |
Modifier and Type | Method and Description |
---|---|
static junit.framework.Test |
allModules(Class<? extends junit.framework.TestCase> clazz,
String... tests)
Factory method to create wrapper test that knows how to setup proper
NetBeans Runtime Container environment.
|
static junit.framework.Test |
create(Class<? extends junit.framework.TestCase> clazz,
String clustersRegExp,
String moduleRegExp)
Factory method to create wrapper test that knows how to setup proper
NetBeans Runtime Container environment.
|
static junit.framework.Test |
create(Class<? extends junit.framework.TestCase> clazz,
String clustersRegExp,
String moduleRegExp,
String... tests)
Factory method to create wrapper test that knows how to setup proper
NetBeans Runtime Container environment.
|
static junit.framework.Test |
create(NbModuleSuite.Configuration config)
Factory method to create wrapper test that knows how to setup proper
NetBeans Runtime Container environment.
|
static NbModuleSuite.Configuration |
createConfiguration(Class<? extends junit.framework.TestCase> clazz)
Creates default configuration wrapping a class that can be executed
with the
NbModuleSuite support. |
static NbModuleSuite.Configuration |
emptyConfiguration()
Creates empty configuration without any class assiciated.
|
public static junit.framework.Test create(Class<? extends junit.framework.TestCase> clazz, String clustersRegExp, String moduleRegExp)
ide|java
will start the container just
with platform, ide and java clusters.clazz
- the class with bunch of testXYZ methodsclustersRegExp
- regexp to apply to name of cluster to find out if it is supposed to be included
in the runtime container setup or notmoduleRegExp
- by default all modules on classpath are turned on,
however this regular expression can specify additional ones. If not
null, the specified cluster will be searched for modules with such
codenamebase and those will be turned onpublic static junit.framework.Test create(Class<? extends junit.framework.TestCase> clazz, String clustersRegExp, String moduleRegExp, String... tests)
ide|java
will start the container just
with platform, ide and java clusters.clazz
- the class with bunch of testXYZ methodsclustersRegExp
- regexp to apply to name of cluster to find out if it is supposed to be included
in the runtime container setup or notmoduleRegExp
- by default all modules on classpath are turned on,
however this regular expression can specify additional ones. If not
null, the specified cluster will be searched for modules with such
codenamebase and those will be turned ontests
- names of test methods to execute from the clazz
, if
no test methods are specified, all tests in the class are executedpublic static junit.framework.Test allModules(Class<? extends junit.framework.TestCase> clazz, String... tests)
clazz
- the class with bunch of testXYZ methodstests
- names of test methods to execute from the clazz
, if
no test methods are specified, all tests in the class are executedpublic static NbModuleSuite.Configuration createConfiguration(Class<? extends junit.framework.TestCase> clazz)
NbModuleSuite
support.clazz
- the class to test, the actual instances will be created
for the class of the same name, but loaded by different classloaderpublic static NbModuleSuite.Configuration emptyConfiguration()
NbModuleSuite.Configuration.addTest(java.lang.Class, java.lang.String[])
then to register proper test classes.public static junit.framework.Test create(NbModuleSuite.Configuration config)
NbModuleSuite.Configuration
.config
- the configuration for the testNbModuleSuite.Configuration.suite()