Class RuleTestRunner
- java.lang.Object
-
- org.junit.runner.Runner
-
- org.junit.runners.ParentRunner<TestDescriptor>
-
- net.sourceforge.pmd.testframework.RuleTestRunner
-
- All Implemented Interfaces:
org.junit.runner.Describable
,org.junit.runner.manipulation.Filterable
,org.junit.runner.manipulation.Orderable
,org.junit.runner.manipulation.Sortable
public class RuleTestRunner extends org.junit.runners.ParentRunner<TestDescriptor>
A JUnit Runner, that executes all declared rule tests in the class. It supports Before and After methods as well as TestRules.- Author:
- Andreas Dangel
-
-
Constructor Summary
Constructors Constructor Description RuleTestRunner(Class<? extends RuleTst> testClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.junit.runner.Description
describeChild(TestDescriptor testCase)
protected List<TestDescriptor>
getChildren()
boolean
hasUnitTests()
Checks whether this test class has additionally unit test methods.protected boolean
isIgnored(TestDescriptor child)
protected void
runChild(TestDescriptor testCase, org.junit.runner.notification.RunNotifier notifier)
-
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, collectInitializationErrors, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolation
-
-
-
-
Method Detail
-
describeChild
protected org.junit.runner.Description describeChild(TestDescriptor testCase)
- Specified by:
describeChild
in classorg.junit.runners.ParentRunner<TestDescriptor>
-
hasUnitTests
public boolean hasUnitTests()
Checks whether this test class has additionally unit test methods.- Returns:
- true if there is at least one unit test method.
-
getChildren
protected List<TestDescriptor> getChildren()
- Specified by:
getChildren
in classorg.junit.runners.ParentRunner<TestDescriptor>
-
runChild
protected void runChild(TestDescriptor testCase, org.junit.runner.notification.RunNotifier notifier)
- Specified by:
runChild
in classorg.junit.runners.ParentRunner<TestDescriptor>
-
isIgnored
protected boolean isIgnored(TestDescriptor child)
- Overrides:
isIgnored
in classorg.junit.runners.ParentRunner<TestDescriptor>
-
-