net.sourceforge.pmd.testframework
Class PMDTestRunner

java.lang.Object
  extended by org.junit.runner.Runner
      extended by net.sourceforge.pmd.testframework.PMDTestRunner
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable

public class PMDTestRunner
extends org.junit.runner.Runner
implements org.junit.runner.manipulation.Filterable

A test runner for rule tests. Unlike SimpleAggregatorTst.CustomXmlTestClassMethodsRunner it also reports the successful executed tests and allows to selectively execute single test cases (it is Filterable).

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
PMDTestRunner(Class<? extends SimpleAggregatorTst> klass)
          Creates a new PMDTestRunner for the given test class.
 
Method Summary
 void filter(org.junit.runner.manipulation.Filter filter)
           
 org.junit.runner.Description getDescription()
           
 void run(org.junit.runner.notification.RunNotifier notifier)
           
 
Methods inherited from class org.junit.runner.Runner
testCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PMDTestRunner

public PMDTestRunner(Class<? extends SimpleAggregatorTst> klass)
              throws org.junit.runners.model.InitializationError
Creates a new PMDTestRunner for the given test class.

Parameters:
klass - the test class that is under test
Throws:
org.junit.runners.model.InitializationError - any error
Method Detail

getDescription

public org.junit.runner.Description getDescription()
Specified by:
getDescription in interface org.junit.runner.Describable
Specified by:
getDescription in class org.junit.runner.Runner

run

public void run(org.junit.runner.notification.RunNotifier notifier)
Specified by:
run in class org.junit.runner.Runner

filter

public void filter(org.junit.runner.manipulation.Filter filter)
            throws org.junit.runner.manipulation.NoTestsRemainException
Specified by:
filter in interface org.junit.runner.manipulation.Filterable
Throws:
org.junit.runner.manipulation.NoTestsRemainException


Copyright © 2002-2015 InfoEther. All Rights Reserved.