patterntesting.runtime.junit
Class ProxyRunner

Package class diagram package ProxyRunner
java.lang.Object
  extended by org.junit.runner.Runner
      extended by org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
          extended by patterntesting.runtime.junit.SmokeRunner
              extended by patterntesting.runtime.junit.ProxyRunner
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable

public class ProxyRunner
extends SmokeRunner

This is a JUnit runner which delegates the call one (or perhaps several) other JUnit runners.
Till 1.2.10-YEARS it was placed in the experimental package.

Since:
1.2 (11.11.2011)
Author:
oliver (ob@aosd.de)

Constructor Summary
ProxyRunner(Class<?> testClass)
          Instantiates a new proxy runner.
 
Method Summary
protected  List<org.junit.runners.model.FrameworkMethod> getChildren()
          Gets the children.
 org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod> getDelegateRunner()
          Gets the Runner defined by @DelegateTo.
 org.junit.runner.Description getDescription()
          Gets the description.
 void run(org.junit.runner.notification.RunNotifier notifier)
          Here we decide if the whole class is to be run.
protected  void runChild(org.junit.runners.model.FrameworkMethod method, org.junit.runner.notification.RunNotifier notifier)
          Run child.
 
Methods inherited from class patterntesting.runtime.junit.SmokeRunner
addFailure, describeChild, fireTestAssumptionFailed, getFilter, getJUnit3TestMethods, logStatement, methodBlock, shouldBeIgnored, shouldBeRun, withAfterClasses, withBeforeClasses
 
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, collectInitializationErrors, filter, getName, getRunnerAnnotations, getTestClass, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods
 
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

ProxyRunner

public ProxyRunner(Class<?> testClass)
            throws org.junit.runners.model.InitializationError
Instantiates a new proxy runner.

Parameters:
testClass - the test class
Throws:
org.junit.runners.model.InitializationError - the initialization error
Method Detail

getDelegateRunner

public final org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod> getDelegateRunner()
Gets the Runner defined by @DelegateTo.
Note: This class is public for testing reasons.

Returns:
the delegate runner

getDescription

public org.junit.runner.Description getDescription()
Gets the description.

Specified by:
getDescription in interface org.junit.runner.Describable
Overrides:
getDescription in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
Returns:
the description
See Also:
Runner.getDescription()

run

public void run(org.junit.runner.notification.RunNotifier notifier)
Here we decide if the whole class is to be run.

Overrides:
run in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
Parameters:
notifier - the notifier
See Also:
Runner.run(org.junit.runner.notification.RunNotifier)

getChildren

protected List<org.junit.runners.model.FrameworkMethod> getChildren()
Gets the children.

Overrides:
getChildren in class SmokeRunner
Returns:
the children
See Also:
ParentRunner.getChildren()

runChild

protected void runChild(org.junit.runners.model.FrameworkMethod method,
                        org.junit.runner.notification.RunNotifier notifier)
Run child. This method may be not called (e.g. it is not called by SpringJUnit4ClassRunner) but must be implemented because of the abstract superclass (ParentRunner).

Overrides:
runChild in class SmokeRunner
Parameters:
method - the method
notifier - the notifier
See Also:
ParentRunner.runChild(java.lang.Object, org.junit.runner.notification.RunNotifier)


Copyright © 2002–2014 PatternTesting Team. All rights reserved.