org.kuali.rice.test.runners
Class RiceUnitTestClassRunner

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.kuali.rice.test.runners.RiceUnitTestClassRunner
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable

public class RiceUnitTestClassRunner
extends org.junit.runners.BlockJUnit4ClassRunner

A Runner which sets up Rice unit tests appropriately. 1) It invokes setName() on the Test (if the method exists) and sets it to the name of the test method being invoked.

Since:
0.9
Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
RiceUnitTestClassRunner(Class<?> testClass)
           
 
Method Summary
protected  Object createTest()
           
protected  void runChild(org.junit.runners.model.FrameworkMethod method, org.junit.runner.notification.RunNotifier runNotifier)
           
protected  void setTestMethod(Object test, Method method)
          Sets the Method on the test case if it is MethodAware
protected  void setTestName(Object test, Method testMethod)
           
 
Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
collectInitializationErrors, computeTestMethods, describeChild, getChildren, getTestRules, methodBlock, methodInvoker, possiblyExpectingExceptions, rules, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout
 
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, filter, getDescription, getName, getRunnerAnnotations, getTestClass, run, runLeaf, 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

RiceUnitTestClassRunner

public RiceUnitTestClassRunner(Class<?> testClass)
                        throws org.junit.runners.model.InitializationError
Throws:
org.junit.runners.model.InitializationError
Method Detail

runChild

protected void runChild(org.junit.runners.model.FrameworkMethod method,
                        org.junit.runner.notification.RunNotifier runNotifier)
Overrides:
runChild in class org.junit.runners.BlockJUnit4ClassRunner

createTest

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

setTestMethod

protected void setTestMethod(Object test,
                             Method method)
Sets the Method on the test case if it is MethodAware

Parameters:
method - the current method to be run
test - the test instance

setTestName

protected void setTestName(Object test,
                           Method testMethod)
                    throws Exception
Throws:
Exception


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.