public class TestDescription
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
TestDescription(java.io.File root,
java.io.File file,
java.util.Map params)
Construct a test description from the parameters of a recognized descriptions.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object td) |
java.lang.String |
getClassDir()
Deprecated.
use
getParameter("classDir") instead |
java.io.File |
getDir()
Get the directory for this test description.
|
java.lang.String |
getExecuteArgs()
Deprecated.
use
getParameter("executeArgs") instead |
java.lang.String |
getExecuteClass()
Deprecated.
use
getParameter("executeClass") instead |
java.io.File |
getFile()
Get the file for this test description.
|
java.lang.String |
getId()
Get the id within the file for this test description.
|
java.lang.String[] |
getKeywords()
Get the set of keywords for this test description,
as specified by the "keywords" parameter.
|
java.util.Set |
getKeywordTable()
Get the set of keywords for this test description,
as specified by the "keywords" parameter.
|
java.lang.String |
getName()
Get the name of this test description; if not given explicitly,
it defaults to the filename root of the first source file.
|
java.lang.String |
getParameter(java.lang.String key)
Get a parameter of the test description by name.
|
int |
getParameterCount()
Get the number of parameters contained in this test description.
|
java.util.Iterator |
getParameterKeys()
Get an iterator for the names of the parameters contained in
this test description.
|
java.io.File |
getRoot()
Deprecated.
No longer relevant for some test suites, so will not be supported
in the future. If needed the value can be determined by asking the test
suite's
TestFinder . |
java.lang.String |
getRootDir()
Get the root directory for this test suite
WARNING: If this description has been read in from a .jtr file, the rootDir
may be inappropriate for this system.
|
java.io.File |
getRootRelativeDir()
Deprecated.
Use getRootRelativeFile().getParent()
|
java.io.File |
getRootRelativeFile()
Get the file of the test, relative to the root dir for the test suite.
|
java.lang.String |
getRootRelativePath()
Get the path of the test, relative to the root dir for the test suite.
|
java.lang.String |
getRootRelativeURL()
Get the url of the test, relative to the root dir for the test suite.
|
java.io.File[] |
getSourceFiles()
Get the set of source files for this test description,
as specified by the "source" parameter.
|
java.lang.String[] |
getSources()
Get the set of source files for this test description,
as specified by the "source" parameter.
|
java.net.URL[] |
getSourceURLs()
Get a list of associated files for a specified test description.
|
int |
getTimeout()
Deprecated.
use
getParameter("timeout") instead |
java.lang.String |
getTitle()
Get the title of this test description.
|
int |
hashCode() |
java.lang.String |
toString()
Simple standard debugging output.
|
public TestDescription(java.io.File root, java.io.File file, java.util.Map params) throws java.lang.IllegalArgumentException
root
- The root file of the test suitefile
- The file containing the test descriptionparams
- The collected parameters of the test descriptionjava.lang.IllegalArgumentException
- if the file argument is an absolute
filename and does not begin with the root filename.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object td)
equals
in class java.lang.Object
public java.io.File getDir()
public java.io.File getFile()
public java.lang.String getId()
public java.lang.String getTitle()
getName()
.public java.lang.String getName()
public java.lang.String[] getKeywords()
public java.util.Set getKeywordTable()
public java.lang.String[] getSources()
getSourceFiles()
public java.io.File[] getSourceFiles()
getSources()
public java.net.URL[] getSourceURLs()
public java.lang.String getClassDir()
getParameter("classDir")
insteadpublic java.lang.String getExecuteClass()
getParameter("executeClass")
insteadpublic java.lang.String getExecuteArgs()
getParameter("executeArgs")
insteadpublic int getTimeout()
getParameter("timeout")
insteadpublic java.io.File getRoot()
TestFinder
.getRootDir()
public java.lang.String getRootDir()
public java.lang.String getRootRelativePath()
public java.io.File getRootRelativeFile()
public java.lang.String getRootRelativeURL()
public java.io.File getRootRelativeDir()
public int getParameterCount()
public java.util.Iterator getParameterKeys()
public java.lang.String getParameter(java.lang.String key)
key
- the name of the parameter value to be returnedpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.