org.unitils.io.annotation.handler
Class TempDirAnnotationHandler

java.lang.Object
  extended by org.unitils.core.TestListener
      extended by org.unitils.io.annotation.handler.TempDirAnnotationHandler

public class TempDirAnnotationHandler
extends TestListener

Implements the behavior of the TempDir annotation.
See annotation javadoc for more info.

Since:
3.3
Author:
Jeroen Horemans, Tim Ducheyne, Thomas De Rycke

Field Summary
protected  Boolean cleanupAfterTest
           
protected  TempService tempService
           
 
Constructor Summary
TempDirAnnotationHandler(TempService tempService, Boolean cleanupAfterTest)
           
 
Method Summary
 void afterTestMethod(Object testObject, Method testMethod, Throwable t)
           
 void beforeTestSetUp(Object testObject, Method testMethod)
           
protected  void createTempDirForField(Object testObject, Method testMethod, Field field)
           
protected  void deleteTempDirForField(Object testObject, Field field)
           
 
Methods inherited from class org.unitils.core.TestListener
afterCreateTestObject, afterTestTearDown, beforeTestClass, beforeTestMethod, shouldInvokeTestMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cleanupAfterTest

protected Boolean cleanupAfterTest

tempService

protected TempService tempService
Constructor Detail

TempDirAnnotationHandler

public TempDirAnnotationHandler(TempService tempService,
                                Boolean cleanupAfterTest)
Method Detail

beforeTestSetUp

public void beforeTestSetUp(Object testObject,
                            Method testMethod)
Overrides:
beforeTestSetUp in class TestListener

afterTestMethod

public void afterTestMethod(Object testObject,
                            Method testMethod,
                            Throwable t)
Overrides:
afterTestMethod in class TestListener

createTempDirForField

protected void createTempDirForField(Object testObject,
                                     Method testMethod,
                                     Field field)

deleteTempDirForField

protected void deleteTempDirForField(Object testObject,
                                     Field field)


Copyright © 2014. All Rights Reserved.