|
JUnit-addons version 1.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junitx.util.AbstractSuiteBuilder | +--junitx.util.ArchiveSuiteBuilder
Extracts the testcases from a zip or jar achive. Use the TestFilter to specify the pattern of the classes to load.
ArchiveSuiteBuilder builder = new ArchiveSuiteBuilder(); Test suite = builer.suite("myarchive.zip");Returns a suite containing AllTests.class classes:
ArchiveSuiteBuilder builder = new ArchiveSuiteBuilder(); builder.setFilter(new TestFilter() { public boolean include(String classpath) { return super.include(classpath) && SimpleTestFilter.getClassName(classpath).equals("AllTests"); } }); Test suite = builer.suite("myjar.jar");
Constructor Summary | |
ArchiveSuiteBuilder()
Constructs an empty ArchiveSuiteBuilder object. |
|
ArchiveSuiteBuilder(TestFilter filter)
Constructs an ArchiveSuiteBuilder object with the given filter. |
Method Summary | |
protected java.util.List |
browse(java.util.zip.ZipFile file)
Returns the list of test classes contained in the ZipFile. |
protected boolean |
isTestClass(java.lang.String path)
Returns true if the given path refers a test class. |
protected void |
merge(java.util.List classenames,
junit.framework.TestSuite suite)
Populates the suite with test cases extracted from the classnames list. |
void |
setFilter(TestFilter filter)
Sets the filter defining the test classes to be included. |
junit.framework.Test |
suite(java.lang.String filename)
Constructs a TestSuite by extracting all test classes from an archive specified by the filename. |
junit.framework.Test |
suite(java.util.zip.ZipFile file)
Constructs a TestSuite by extracting all test classes from the given file archive. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ArchiveSuiteBuilder()
public ArchiveSuiteBuilder(TestFilter filter)
Method Detail |
public junit.framework.Test suite(java.util.zip.ZipFile file) throws java.lang.Exception
java.lang.Exception
public junit.framework.Test suite(java.lang.String filename) throws java.lang.Exception
java.lang.Exception
protected java.util.List browse(java.util.zip.ZipFile file)
AbstractSuiteBuilder.isTestClass(java.lang.String)
public void setFilter(TestFilter filter)
protected boolean isTestClass(java.lang.String path)
protected void merge(java.util.List classenames, junit.framework.TestSuite suite) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
|
JUnit-addons version 1.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |