public abstract class TestHelper extends PluginHelper
| Modifier and Type | Field and Description |
|---|---|
protected static File |
basedir |
protected static File |
testBasedir |
protected static boolean |
verbose |
memoryFactors, memoryUnites, SNAPSHOT_SUFFIX, timeFactors, timeUnites| Constructor and Description |
|---|
TestHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkExistsPattern(File file,
String pattern,
String encoding,
boolean required)
Checks on the given
file that :
file exists
the given pattern exists required = true
(or not required = false) in the content of the file.
|
static void |
checkPattern(File file,
String content,
String pattern,
boolean required) |
static File |
getBasedir() |
static File |
getTestBasedir() |
static File |
getTestDir(Class<?> type,
String prefix) |
static boolean |
isVerbose() |
static void |
setBasedir(File basedir) |
static void |
setVerbose(boolean verbose) |
addResourceDir, addResourceDir, addTestResourceDir, checkEncoding, convert, convertMemory, convertTime, convertTime, copy, copyFiles, copyFiles, createDirectoryIfNecessary, createNewFile, deleteFile, expandFile, expandFiles, getEmptyKeys, getFile, getIncludedFiles, getLines, getLinesAsFiles, getLinesAsURL, getRelativePath, getUrl, prefixLines, readAsString, readAsString, removeSnapshotSuffix, renameFile, setLastModified, splitAndTrim, toGenericList, writeStringprotected static boolean verbose
protected static File basedir
protected static File testBasedir
public static File getTestBasedir()
public static File getBasedir()
PlexusTestCase.getBasedir()public static void setBasedir(File basedir)
public static boolean isVerbose()
public static void setVerbose(boolean verbose)
public static void checkExistsPattern(File file, String pattern, String encoding, boolean required) throws IOException
file that :
pattern exists required = true
(or not required = false) in the content of the file.file - the file to testpattern - the pattern to searchencoding - encoding of the file to readrequired - flag to says if pattern should (or not) be found in
file's contentIOException - if could not read filepublic static void checkPattern(File file, String content, String pattern, boolean required) throws IOException
IOExceptionCopyright © 2009–2016 CodeLutin. All rights reserved.