org.gcube.common.mycontainer
Class MyContainerTestRunner

java.lang.Object
  extended by org.junit.runner.Runner
      extended by org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
          extended by org.junit.runners.BlockJUnit4ClassRunner
              extended by org.gcube.common.mycontainer.MyContainerTestRunner
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable

public class MyContainerTestRunner
extends org.junit.runners.BlockJUnit4ClassRunner

A JUnit Runner for integration tests in MyContainer.

The runner offer transparencies over standard usese of MyContainer API in the JUnit framework, including:

In addition, the runner will surround the logs of each test with their name, for increased readability in test reports and during interactive testing.

Usage may be illustrated with the following example:

 

Author:
Fabio Simeoni

Constructor Summary
MyContainerTestRunner(Class<?> klass)
          Creates an instance for a test class.
 
Method Summary
protected  void runChild(org.junit.runners.model.FrameworkMethod method, org.junit.runner.notification.RunNotifier notifier)
          
protected  org.junit.runners.model.Statement withAfterClasses(org.junit.runners.model.Statement statement)
          
protected  org.junit.runners.model.Statement withBeforeClasses(org.junit.runners.model.Statement statement)
          
 
Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, methodBlock, methodInvoker, possiblyExpectingExceptions, testName, validateConstructor, validateInstanceMethods, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout
 
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, filter, getDescription, getName, getTestClass, run, 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

MyContainerTestRunner

public MyContainerTestRunner(Class<?> klass)
                      throws org.junit.runners.model.InitializationError
Creates an instance for a test class.

Parameters:
klass - the test class
Throws:
org.junit.runners.model.InitializationError - if the test class is not well formed
Method Detail

runChild

protected void runChild(org.junit.runners.model.FrameworkMethod method,
                        org.junit.runner.notification.RunNotifier notifier)

Overrides:
runChild in class org.junit.runners.BlockJUnit4ClassRunner

withBeforeClasses

protected org.junit.runners.model.Statement withBeforeClasses(org.junit.runners.model.Statement statement)

Overrides:
withBeforeClasses in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>

withAfterClasses

protected org.junit.runners.model.Statement withAfterClasses(org.junit.runners.model.Statement statement)

Overrides:
withAfterClasses in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>


Copyright © 2013. All Rights Reserved.