Package org.apache.ant.antunit.junit4
Class AntUnitSuiteRunner
- java.lang.Object
-
- org.junit.runner.Runner
-
- org.apache.ant.antunit.junit4.AntUnitSuiteRunner
-
- All Implemented Interfaces:
org.junit.runner.Describable,org.junit.runner.manipulation.Filterable,org.junit.runner.manipulation.Sortable
public class AntUnitSuiteRunner extends org.junit.runner.Runner implements org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.SortableJUnit4 Runner to put in a RunWith annotation of the AntUnitSuite when using a JUnit4 runner. Using this runner is not mandatory because junit4 is able to run junit3 test. However, the test may be faster with this Runner (with the default junit4 adapter, the suiteSetUp and suiteTearDown will be executed around every test target). Also, more features are available when this runner is used (filtering & sorting)
-
-
Field Summary
Fields Modifier and Type Field Description private AntUnitSuitejunit3Suiteprivate java.util.MaptargetDescriptionsprivate java.util.ListtargetsOrder
-
Constructor Summary
Constructors Modifier Constructor Description AntUnitSuiteRunner(java.lang.Class testCaseClass)privateAntUnitSuiteRunner(AntUnitSuite suite, java.lang.Class junitTestClass)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfilter(org.junit.runner.manipulation.Filter filter)Filterable implementationorg.junit.runner.DescriptiongetDescription()Runner implementationprivate static AntUnitSuitegetJUnit3AntSuite(java.lang.Class testCaseClass)voidrun(org.junit.runner.notification.RunNotifier junitNotifier)Runner implementationvoidsort(org.junit.runner.manipulation.Sorter sorter)Sortable implementation
-
-
-
Field Detail
-
junit3Suite
private final AntUnitSuite junit3Suite
-
targetDescriptions
private final java.util.Map targetDescriptions
-
targetsOrder
private final java.util.List targetsOrder
-
-
Constructor Detail
-
AntUnitSuiteRunner
private AntUnitSuiteRunner(AntUnitSuite suite, java.lang.Class junitTestClass) throws org.junit.internal.runners.InitializationError
- Throws:
org.junit.internal.runners.InitializationError
-
AntUnitSuiteRunner
public AntUnitSuiteRunner(java.lang.Class testCaseClass) throws org.junit.internal.runners.InitializationError- Throws:
org.junit.internal.runners.InitializationError
-
-
Method Detail
-
getJUnit3AntSuite
private static AntUnitSuite getJUnit3AntSuite(java.lang.Class testCaseClass) throws org.junit.internal.runners.InitializationError
- Throws:
org.junit.internal.runners.InitializationError
-
filter
public void filter(org.junit.runner.manipulation.Filter filter) throws org.junit.runner.manipulation.NoTestsRemainExceptionFilterable implementation- Specified by:
filterin interfaceorg.junit.runner.manipulation.Filterable- Throws:
org.junit.runner.manipulation.NoTestsRemainException
-
sort
public void sort(org.junit.runner.manipulation.Sorter sorter)
Sortable implementation- Specified by:
sortin interfaceorg.junit.runner.manipulation.Sortable
-
getDescription
public org.junit.runner.Description getDescription()
Runner implementation- Specified by:
getDescriptionin interfaceorg.junit.runner.Describable- Specified by:
getDescriptionin classorg.junit.runner.Runner
-
run
public void run(org.junit.runner.notification.RunNotifier junitNotifier)
Runner implementation- Specified by:
runin classorg.junit.runner.Runner
-
-