org.unitils.io
Class IOModule

java.lang.Object
  extended by org.unitils.io.IOModule
All Implemented Interfaces:
Module

public class IOModule
extends Object
implements Module

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

Nested Class Summary
protected  class IOModule.IOTestListener
           
 
Field Summary
protected static String CLEANUP_AFTER_TEST
           
protected  Properties configuration
           
protected  FileContentReader fileContentReader
           
protected  TempService tempService
           
 
Constructor Summary
IOModule()
           
 
Method Summary
 void afterInit()
          Gives the module the opportunity to performs initialization that can only work after all other modules have been initialized
protected  FileContentReader createFileContentReader()
           
 File createTempDir(String dirName)
           
 File createTempFile(String fileName)
           
protected  TempService createTempService()
           
 void deleteTempFileOrDir(File fileOrDir)
           
 TestListener getTestListener()
          Creates the test listener for this module.
 void init(Properties configuration)
          Initializes the module with the given configuration settings.
<T> T
readFileContent(String fileName, Class<T> targetType, String encoding, Class<?> testClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLEANUP_AFTER_TEST

protected static final String CLEANUP_AFTER_TEST
See Also:
Constant Field Values

configuration

protected Properties configuration

fileContentReader

protected FileContentReader fileContentReader

tempService

protected TempService tempService
Constructor Detail

IOModule

public IOModule()
Method Detail

init

public void init(Properties configuration)
Description copied from interface: Module
Initializes the module with the given configuration settings.

Specified by:
init in interface Module
Parameters:
configuration - The config, not null

afterInit

public void afterInit()
Description copied from interface: Module
Gives the module the opportunity to performs initialization that can only work after all other modules have been initialized

Specified by:
afterInit in interface Module

getTestListener

public TestListener getTestListener()
Description copied from interface: Module
Creates the test listener for this module.

Specified by:
getTestListener in interface Module
Returns:
The test listener, not null

readFileContent

public <T> T readFileContent(String fileName,
                             Class<T> targetType,
                             String encoding,
                             Class<?> testClass)

createTempFile

public File createTempFile(String fileName)

createTempDir

public File createTempDir(String dirName)

deleteTempFileOrDir

public void deleteTempFileOrDir(File fileOrDir)

createFileContentReader

protected FileContentReader createFileContentReader()

createTempService

protected TempService createTempService()


Copyright © 2011. All Rights Reserved.