|
org.netbeans.modules.nbjunit/1 1.75 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.junit.NbModuleSuite
public class NbModuleSuite
Wraps a test class with proper NetBeans Runtime Container environment. This allows to execute tests in a very similar environment to the actual invocation in the NetBeans IDE. To use write your test as you are used to and add suite static method:
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() { ... }
}
| Nested Class Summary | |
|---|---|
static class |
NbModuleSuite.Configuration
Settings object that allows one to configure execution of whole NbModuleSuite. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
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 on
public 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 executed
public 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 executed
public 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 classloader
public 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 test
NbModuleSuite.Configuration.suite()
|
org.netbeans.modules.nbjunit/1 1.75 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||