org.kuali.rice.test.runners
Class RiceUnitTestClassRunner

java.lang.Object
  extended by org.junit.runner.Runner
      extended by org.junit.internal.runners.JUnit4ClassRunner
          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.internal.runners.JUnit4ClassRunner

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 invokeTestMethod(Method 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.internal.runners.JUnit4ClassRunner
classAnnotations, filter, getDescription, getName, getTestClass, getTestMethods, methodDescription, run, runMethods, sort, testAnnotations, 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

RiceUnitTestClassRunner

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

invokeTestMethod

protected void invokeTestMethod(Method method,
                                org.junit.runner.notification.RunNotifier runNotifier)
Overrides:
invokeTestMethod in class org.junit.internal.runners.JUnit4ClassRunner

createTest

protected Object createTest()
                     throws Exception
Overrides:
createTest in class org.junit.internal.runners.JUnit4ClassRunner
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

setTestName

protected void setTestName(Object test,
                           Method testMethod)


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.