org.ops4j.pax.exam.junit
Class AbstractJUnit4TestRunner

java.lang.Object
  extended by org.junit.runner.Runner
      extended by org.ops4j.pax.exam.junit.JUnit4TestRunner
          extended by org.ops4j.pax.exam.junit.AbstractJUnit4TestRunner
All Implemented Interfaces:
org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable
Direct Known Subclasses:
MavenConfiguredJUnit4TestRunner

public abstract class AbstractJUnit4TestRunner
extends JUnit4TestRunner

This provides a convenient way to write a self-Runner that can be set in annotation. Extend this class and implement the getTestOptions method of a system wide default setup. Now, writing tests for *your* system is just a matter of setting

Since:
Mar 17, 2009
Author:
Toni Menzel (tonit)

Constructor Summary
AbstractJUnit4TestRunner(java.lang.Class<?> aClass)
           
 
Method Summary
protected  java.util.Collection<JUnit4ConfigMethod> getConfigurationMethods()
          Finds the configuration methods based on the configured ConfigurationStrategy.
protected abstract  Option[] getTestOptions()
           
 
Methods inherited from class org.ops4j.pax.exam.junit.JUnit4TestRunner
classAnnotations, createTest, filter, getDescription, getName, getTestClass, getTestMethods, invokeTestMethod, methodDescription, methodDescription, run, runMethods, sort, testAnnotations, testName, testName, validate, wrapMethod
 
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

AbstractJUnit4TestRunner

public AbstractJUnit4TestRunner(java.lang.Class<?> aClass)
                         throws org.junit.internal.runners.InitializationError
Throws:
org.junit.internal.runners.InitializationError
Method Detail

getConfigurationMethods

protected java.util.Collection<JUnit4ConfigMethod> getConfigurationMethods()
                                                                    throws java.lang.Exception
Description copied from class: JUnit4TestRunner
Finds the configuration methods based on the configured ConfigurationStrategy.

Overrides:
getConfigurationMethods in class JUnit4TestRunner
Returns:
collection of configuration methods (cannot be null but can be empty)
Throws:
java.lang.Exception - - If test instance cannot be created - Re-thrown while finding the configuration methods

getTestOptions

protected abstract Option[] getTestOptions()


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.