Class PMDTestRunner
- java.lang.Object
-
- org.junit.runner.Runner
-
- net.sourceforge.pmd.testframework.PMDTestRunner
-
- All Implemented Interfaces:
org.junit.runner.Describable
,org.junit.runner.manipulation.Filterable
,org.junit.runner.manipulation.Sortable
public class PMDTestRunner extends org.junit.runner.Runner implements org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable
A JUnit Runner, that combines the defaultJUnit4
and our customRuleTestRunner
. It allows to selectively execute single test cases (it isFilterable
).Note: Since we actually run two runners one after another, the static
BeforeClass
and methods will be executed twice and the test class will be instantiated twice, too.In order to use it, you'll need to subclass
SimpleAggregatorTst
and annotate your test class with RunWith:@RunWith(PMDTestRunner.class) public class MyRuleSetTest extends SimpleAggregatorTst { ... }
-
-
Constructor Summary
Constructors Constructor Description PMDTestRunner(java.lang.Class<? extends SimpleAggregatorTst> klass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
filter(org.junit.runner.manipulation.Filter filter)
org.junit.runner.Description
getDescription()
void
run(org.junit.runner.notification.RunNotifier notifier)
void
sort(org.junit.runner.manipulation.Sorter sorter)
-
-
-
Constructor Detail
-
PMDTestRunner
public PMDTestRunner(java.lang.Class<? extends SimpleAggregatorTst> klass) throws org.junit.runners.model.InitializationError
- Throws:
org.junit.runners.model.InitializationError
-
-
Method Detail
-
filter
public void filter(org.junit.runner.manipulation.Filter filter) throws org.junit.runner.manipulation.NoTestsRemainException
- Specified by:
filter
in interfaceorg.junit.runner.manipulation.Filterable
- Throws:
org.junit.runner.manipulation.NoTestsRemainException
-
getDescription
public org.junit.runner.Description getDescription()
- Specified by:
getDescription
in interfaceorg.junit.runner.Describable
- Specified by:
getDescription
in classorg.junit.runner.Runner
-
run
public void run(org.junit.runner.notification.RunNotifier notifier)
- Specified by:
run
in classorg.junit.runner.Runner
-
sort
public void sort(org.junit.runner.manipulation.Sorter sorter)
- Specified by:
sort
in interfaceorg.junit.runner.manipulation.Sortable
-
-