org.springunit.framework.junit4
Class NameRunner

java.lang.Object
  extended by org.junit.runner.Runner
      extended by org.junit.internal.runners.JUnit4ClassRunner
          extended by org.springunit.framework.junit4.NameRunner
All Implemented Interfaces:
org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable

public class NameRunner
extends org.junit.internal.runners.JUnit4ClassRunner

Stores the name of the currently running test from the TestRunner.
This implementation follows the example given by Gabriel Cooper at http://tech.groups.yahoo.com/group/junit/message/18728.

Author:
Ted Velkoff

Constructor Summary
NameRunner(Class<?> clazz)
           
 
Method Summary
static String getTestMethodName()
           
static String getTestName()
           
 void run(org.junit.runner.notification.RunNotifier notifier)
           
static void setTestName(String name)
           
 
Methods inherited from class org.junit.internal.runners.JUnit4ClassRunner
classAnnotations, createTest, filter, getDescription, getName, getTestClass, getTestMethods, invokeTestMethod, methodDescription, 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

NameRunner

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

getTestName

public static String getTestName()

setTestName

public static void setTestName(String name)

getTestMethodName

public static String getTestMethodName()

run

public void run(org.junit.runner.notification.RunNotifier notifier)
Overrides:
run in class org.junit.internal.runners.JUnit4ClassRunner


Copyright © 2007 null. All Rights Reserved.