org.sonatype.sisu.litmus.testsupport
Class TestUtil
java.lang.Object
org.sonatype.sisu.litmus.testsupport.TestUtil
public final class TestUtil
- extends Object
Test utilities.
- Since:
- 1.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BASEDIR
public static final String BASEDIR
- See Also:
- Constant Field Values
TARGET
public static final String TARGET
- See Also:
- Constant Field Values
TMP
public static final String TMP
- See Also:
- Constant Field Values
baseDir
protected final File baseDir
log
@NonNls
protected final org.slf4j.Logger log
TestUtil
public TestUtil(Class owner)
TestUtil
public TestUtil(Object owner)
getBaseDir
public File getBaseDir()
getLog
public org.slf4j.Logger getLog()
initBaseDir
protected File initBaseDir()
- Determine the value of ${basedir}, which should be the base directory of
the module which the concrete test class is defined in.
If The system property basedir is already set, then that value is used,
otherwise we determine the value from the code-source of the containing concrete class
and set the basedir system property to that value.
- Returns:
- The base directory of the module which contains the concrete test class.
- See Also:
This field is always initialized to the value which this method returns.
getTargetDir
public File getTargetDir()
getTmpDir
public File getTmpDir()
setTmpDir
public void setTmpDir(File tmpDir)
resolveFile
public File resolveFile(@NonNls
String path)
- Resolve the given path to a file rooted to
baseDir
.
- Parameters:
path
- The path to resolve.
- Returns:
- The resolved file for the given path.
resolvePath
public String resolvePath(String path)
- Resolve the given path to a path rooted to
baseDir
.
- Parameters:
path
- The path to resolve.
- Returns:
- The resolved path for the given path.
- See Also:
resolveFile(String)
createTempFile
public File createTempFile(File dir,
String prefix)
createTempFile
public File createTempFile(String prefix)
createTempFile
public File createTempFile()
- Since:
- 1.1
createTempDir
public File createTempDir(File dir,
String prefix)
createTempDir
public File createTempDir(String prefix)
createTempDir
public File createTempDir()
- Since:
- 1.1
Copyright © 2008-2012 Sonatype, Inc.. All Rights Reserved.