com.faunos.util.test
Class Helper

java.lang.Object
  extended by com.faunos.util.test.Helper

public class Helper
extends Object

Utility used by some test cases. Provides support for test cases that need to write to the file system by offering some hopefully reasonable file locations for creating test directories and files.


Field Summary
static String ARTIFACTS_DIR_NAME
           
 
Constructor Summary
Helper()
           
Helper(Class<?> codeBaseClass)
           
 
Method Summary
 File getArtifactsDirectory()
          Resolves, creates and returns the test-artifacts directory.
 File getTempDirectory()
           
 File getTestCaseDirectory(Object testCase)
           
 File getTestCaseDirectory(Object testCase, String subPath)
           
 File getTestCaseDirectory(Object testCase, String subPath, long uncTime)
           
 File getTestCaseFile(Object testCase)
           
 String getTimestamp()
           
 String getTimestamp(long uncTime)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARTIFACTS_DIR_NAME

public static final String ARTIFACTS_DIR_NAME
See Also:
Constant Field Values
Constructor Detail

Helper

public Helper()

Helper

public Helper(Class<?> codeBaseClass)
Method Detail

getArtifactsDirectory

public File getArtifactsDirectory()
Resolves, creates and returns the test-artifacts directory. This directory is resolved against the code source of the Helper instance (using a JarDirectory).


getTimestamp

public String getTimestamp()

getTimestamp

public String getTimestamp(long uncTime)

getTestCaseDirectory

public File getTestCaseDirectory(Object testCase)

getTestCaseDirectory

public File getTestCaseDirectory(Object testCase,
                                 String subPath)

getTestCaseDirectory

public File getTestCaseDirectory(Object testCase,
                                 String subPath,
                                 long uncTime)

getTempDirectory

public File getTempDirectory()

getTestCaseFile

public File getTestCaseFile(Object testCase)
                     throws IOException
Throws:
IOException


SourceForge.net Logo