org.unitils
Class UnitilsJUnit4TestClassRunner.TestListenerInvokingMethodRoadie

java.lang.Object
  extended by org.junit.internal.runners.MethodRoadie
      extended by org.unitils.UnitilsJUnit4TestClassRunner.TestListenerInvokingMethodRoadie
Enclosing class:
UnitilsJUnit4TestClassRunner

protected class UnitilsJUnit4TestClassRunner.TestListenerInvokingMethodRoadie
extends org.junit.internal.runners.MethodRoadie

Custom method roadie that invokes the unitils test listener methods at the apropriate moments.


Field Summary
protected  Method testMethod
           
protected  Object testObject
           
protected  Throwable throwable
           
 
Constructor Summary
UnitilsJUnit4TestClassRunner.TestListenerInvokingMethodRoadie(Object testObject, Method testMethod, org.junit.internal.runners.TestMethod jUnitTestMethod, org.junit.runner.notification.RunNotifier notifier, org.junit.runner.Description description)
          Creates a method roadie.
 
Method Summary
protected  void addFailure(Throwable t)
          Registers a test failure
 void runBeforesThenTestThenAfters(Runnable test)
          Overriden JUnit4 method to be able to call TestListener.afterTestTearDown(java.lang.Object, java.lang.reflect.Method).
protected  void runTestMethod()
           
 
Methods inherited from class org.junit.internal.runners.MethodRoadie
run, runTest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

testObject

protected Object testObject

testMethod

protected Method testMethod

throwable

protected Throwable throwable
Constructor Detail

UnitilsJUnit4TestClassRunner.TestListenerInvokingMethodRoadie

public UnitilsJUnit4TestClassRunner.TestListenerInvokingMethodRoadie(Object testObject,
                                                                     Method testMethod,
                                                                     org.junit.internal.runners.TestMethod jUnitTestMethod,
                                                                     org.junit.runner.notification.RunNotifier notifier,
                                                                     org.junit.runner.Description description)
Creates a method roadie.

Parameters:
testObject - The test instance, not null
testMethod - The test method, not null
jUnitTestMethod - The JUnit test method
notifier - The run listener, not null
description - A test description
Method Detail

runBeforesThenTestThenAfters

public void runBeforesThenTestThenAfters(Runnable test)
Overriden JUnit4 method to be able to call TestListener.afterTestTearDown(java.lang.Object, java.lang.reflect.Method).

Overrides:
runBeforesThenTestThenAfters in class org.junit.internal.runners.MethodRoadie

runTestMethod

protected void runTestMethod()
Overrides:
runTestMethod in class org.junit.internal.runners.MethodRoadie

addFailure

protected void addFailure(Throwable t)
Registers a test failure

Overrides:
addFailure in class org.junit.internal.runners.MethodRoadie
Parameters:
t - The exception, not null


Copyright © 2011. All Rights Reserved.