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.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(java.lang.Class<? extends RuleTst> testClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.junit.runner.DescriptiondescribeChild(TestDescriptor testCase)protected java.util.List<TestDescriptor>getChildren()booleanhasUnitTests()Checks whether this test class has additionally unit test methods.protected booleanisIgnored(TestDescriptor child)protected voidrunChild(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, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses
-
-
-
-
Constructor Detail
-
RuleTestRunner
public RuleTestRunner(java.lang.Class<? extends RuleTst> testClass) throws org.junit.runners.model.InitializationError
- Throws:
org.junit.runners.model.InitializationError
-
-
Method Detail
-
describeChild
protected org.junit.runner.Description describeChild(TestDescriptor testCase)
- Specified by:
describeChildin 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 java.util.List<TestDescriptor> getChildren()
- Specified by:
getChildrenin classorg.junit.runners.ParentRunner<TestDescriptor>
-
runChild
protected void runChild(TestDescriptor testCase, org.junit.runner.notification.RunNotifier notifier)
- Specified by:
runChildin classorg.junit.runners.ParentRunner<TestDescriptor>
-
isIgnored
protected boolean isIgnored(TestDescriptor child)
- Overrides:
isIgnoredin classorg.junit.runners.ParentRunner<TestDescriptor>
-
-