public class ChameleonTestFinder extends TestFinder
TestFinder.ErrorHandler, TestFinder.Fault
debug, env
Constructor and Description |
---|
ChameleonTestFinder()
Create an uninitialized ChameleonTestFinder.
|
Modifier and Type | Method and Description |
---|---|
protected int |
decodeArg(java.lang.String[] args,
int i)
Decode the arg at a specified position in the arg array.
|
void |
exclude(java.lang.String name)
Exclude all files with a particular name from being scanned.
|
void |
exclude(java.lang.String[] names)
Exclude all files with particular names from being scanned.
|
java.io.File[] |
getFiles()
Get the files that were found by the most recent call
of read.
|
boolean |
getIgnoreCase()
Check whether or not to ignore case when matching files against entries.
|
TestDescription[] |
getTests()
Get the test descriptions that were found by the most recent call
of read.
|
void |
init(java.lang.String[] args,
java.io.File testSuiteRoot,
TestEnvironment env)
Generic initialization routine.
|
void |
readEntries(java.io.File file)
Read the entries in a file which describe which test finder to use
in which part of the test suite.
|
protected void |
scan(java.io.File file)
Scan a file, looking for test descriptions and other files that might
need to be scanned.
|
void |
setIgnoreCase(boolean b)
Set whether or not to ignore case when matching files against entries.
|
clearErrors, decodeAllArgs, error, error, error, foundFile, foundTestDescription, foundTestDescription, getComparator, getDefaultComparator, getErrorCount, getErrorHandler, getErrors, getRoot, getRootDir, init, isFolder, lastModified, localizedError, normalize, processEntry, read, setComparator, setErrorHandler, setRoot
public ChameleonTestFinder()
public void exclude(java.lang.String name)
name
- The name of files to be excludedpublic void exclude(java.lang.String[] names)
names
- The names of files to be excludedpublic boolean getIgnoreCase()
System.getProperty("os.name").startsWith("Windows")
)
This can be overridden by setting the following system property:
-Djavatest.chameleon.ignoreCase=true|falseThis in turn can be overridden by using -ignoreCase or -dontIgnoreCase in the args to
init
.setIgnoreCase(boolean)
public void setIgnoreCase(boolean b)
b
- whether or not to ignore case when matching files against entries.getIgnoreCase()
public void init(java.lang.String[] args, java.io.File testSuiteRoot, TestEnvironment env) throws TestFinder.Fault
exclude(java.lang.String)
, readEntries(java.io.File)
, etc.init
in class TestFinder
args
- An array of strings giving initialization data.
The primary option is "-f file" to specify the name
of the file describing which test finder to use in which section
of the test suite.testSuiteRoot
- The root file of the test suite.env
- This argument is not required by this test finder.TestFinder.Fault
- if an error is found during initialization.public void readEntries(java.io.File file) throws TestFinder.Fault
file
- The file containing the entries to be read.TestFinder.Fault
- if a problem occurs while reading the file.protected int decodeArg(java.lang.String[] args, int i) throws TestFinder.Fault
TestFinder
decodeArg
in class TestFinder
args
- The array of argumentsi
- The next argument to be decodedTestFinder.Fault
- If there is a problem with the value of the current
arg, such as a bad value to an option, the Fault
exception can be thrown. The exception should NOT be
thrown if the current arg is unrecognized: in that case,
an implementation should delegate the call to the
supertype.protected void scan(java.io.File file)
scan
in class TestFinder
file
- The file to scanpublic java.io.File[] getFiles()
TestFinder
getFiles
in class TestFinder
TestFinder.read(java.io.File)
,
TestFinder.foundFile(java.io.File)
public TestDescription[] getTests()
TestFinder
getTests
in class TestFinder
TestFinder.read(java.io.File)
,
TestFinder.foundTestDescription(java.util.Map, java.io.File, int)
Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.