|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.javatest.TestFinder
com.sun.javatest.finder.ChameleonTestFinder
public class ChameleonTestFinder
A TestFinder that delegates to different test finders in different areas of the test suite, as described by a special "map" file.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.sun.javatest.TestFinder |
|---|
TestFinder.ErrorHandler, TestFinder.Fault |
| Field Summary |
|---|
| Fields inherited from class com.sun.javatest.TestFinder |
|---|
debug, env |
| Constructor Summary | |
|---|---|
ChameleonTestFinder()
Create an uninitialized ChameleonTestFinder. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class com.sun.javatest.TestFinder |
|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChameleonTestFinder()
| Method Detail |
|---|
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|false
This 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 TestFinderargs - 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 TestFinderargs - The array of argumentsi - The next argument to be decoded
TestFinder.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 TestFinderfile - The file to scanpublic java.io.File[] getFiles()
TestFinder
getFiles in class TestFinderTestFinder.read(java.io.File),
TestFinder.foundFile(java.io.File)public TestDescription[] getTests()
TestFinder
getTests in class TestFinderTestFinder.read(java.io.File),
TestFinder.foundTestDescription(java.util.Map, java.io.File, int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||