org.apache.sling.junit.annotations
Class SlingAnnotationsTestRunner

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.apache.sling.junit.annotations.SlingAnnotationsTestRunner
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable

public class SlingAnnotationsTestRunner
extends org.junit.runners.BlockJUnit4ClassRunner

TestRunner which uses a TestObjectProcessor to handle annotations in test classes. A test that has RunWith=SlingAnnotationsTestRunner can use @TestReference, for example, to access OSGi services.


Constructor Summary
SlingAnnotationsTestRunner(java.lang.Class<?> clazz)
           
 
Method Summary
protected  java.lang.Object createTest()
           
 
Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
collectInitializationErrors, computeTestMethods, describeChild, getChildren, methodBlock, methodInvoker, possiblyExpectingExceptions, runChild, 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, withAfterClasses, withBeforeClasses
 
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

SlingAnnotationsTestRunner

public SlingAnnotationsTestRunner(java.lang.Class<?> clazz)
                           throws org.junit.runners.model.InitializationError
Throws:
org.junit.runners.model.InitializationError
Method Detail

createTest

protected java.lang.Object createTest()
                               throws java.lang.Exception
Overrides:
createTest in class org.junit.runners.BlockJUnit4ClassRunner
Throws:
java.lang.Exception


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.