org.apache.camel.test.spring
Class StopWatchTestExecutionListener

java.lang.Object
  extended by org.springframework.test.context.support.AbstractTestExecutionListener
      extended by org.apache.camel.test.spring.StopWatchTestExecutionListener
All Implemented Interfaces:
org.springframework.test.context.TestExecutionListener

public class StopWatchTestExecutionListener
extends org.springframework.test.context.support.AbstractTestExecutionListener

An execution listener that simulates the timing output built in to CamelTestSupport.


Field Summary
protected static ThreadLocal<org.apache.camel.util.StopWatch> threadStopWatch
           
 
Constructor Summary
StopWatchTestExecutionListener()
           
 
Method Summary
 void afterTestMethod(org.springframework.test.context.TestContext testContext)
           
 void beforeTestMethod(org.springframework.test.context.TestContext testContext)
           
static org.apache.camel.util.StopWatch getStopWatch()
          Exists primarily for testing purposes, but allows for access to the underlying stop watch instance for a test.
 
Methods inherited from class org.springframework.test.context.support.AbstractTestExecutionListener
afterTestClass, beforeTestClass, prepareTestInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

threadStopWatch

protected static ThreadLocal<org.apache.camel.util.StopWatch> threadStopWatch
Constructor Detail

StopWatchTestExecutionListener

public StopWatchTestExecutionListener()
Method Detail

getStopWatch

public static org.apache.camel.util.StopWatch getStopWatch()
Exists primarily for testing purposes, but allows for access to the underlying stop watch instance for a test.


beforeTestMethod

public void beforeTestMethod(org.springframework.test.context.TestContext testContext)
                      throws Exception
Specified by:
beforeTestMethod in interface org.springframework.test.context.TestExecutionListener
Overrides:
beforeTestMethod in class org.springframework.test.context.support.AbstractTestExecutionListener
Throws:
Exception

afterTestMethod

public void afterTestMethod(org.springframework.test.context.TestContext testContext)
                     throws Exception
Specified by:
afterTestMethod in interface org.springframework.test.context.TestExecutionListener
Overrides:
afterTestMethod in class org.springframework.test.context.support.AbstractTestExecutionListener
Throws:
Exception


Apache Camel