public class TestCases
extends java.lang.Object
status.
Test cases can be explicitly selected into or excluded from the
set.| Modifier and Type | Class and Description |
|---|---|
static class |
TestCases.Fault
Exception used to report internal errors.
|
| Constructor and Description |
|---|
TestCases(Test t,
java.io.PrintWriter log)
Create an object to handle the test cases of the given test.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Enumeration |
enumerate()
Return an enumeration of the selected test cases, based on the
select and exclude calls that have been made, if any.
|
void |
exclude(java.lang.String testCaseNames)
Explicitly exclude a set of test cases by name.
|
void |
exclude(java.lang.String[] testCaseNames)
Explicitly exclude a set of test cases by name.
|
Status |
invokeTestCases()
Invoke each of the selected test cases, based upon the select and exclude
calls that have been made, if any.
|
protected void |
printStackTrace(java.lang.Throwable t)
Print a stack trace for an exception to the log.
|
void |
select(java.lang.String testCaseNames)
Explicitly select a set of test cases by name.
|
void |
select(java.lang.String[] testCaseNames)
Explicitly select a set of test cases by name.
|
public TestCases(Test t, java.io.PrintWriter log)
t - The test containing the test cases.log - An optional stream to which to write log messages.
Use null if messages are not desired.public void select(java.lang.String testCaseNames)
throws TestCases.Fault
testCaseNames - a comma-separated list of test cases names.
Each name must identify a method in the test object, that takes
no arguments and returns a status.TestCases.Fault - if any of the test case names are invalid.public void select(java.lang.String[] testCaseNames)
throws TestCases.Fault
testCaseNames - an array of test cases names.
Each name must identify a method in the test object, that takes
no arguments and returns a status.TestCases.Fault - if any of the test case names are invalid.public void exclude(java.lang.String testCaseNames)
throws TestCases.Fault
testCaseNames - a comma-separated list of test cases names.
Each name must identify a method in the test object, that takes
no arguments and returns a status.TestCases.Fault - if any of the test case names are invalid.public void exclude(java.lang.String[] testCaseNames)
throws TestCases.Fault
testCaseNames - an array of test cases names.
Each name must identify a method in the test object, that takes
no arguments and returns a status.TestCases.Fault - if any of the test case names are invalid.public java.util.Enumeration enumerate()
public Status invokeTestCases()
StatusinvokeTestCase(Method)
that method will be called to invoke the test cases; otherwise, the test
cases will be invoked directly.
It is an error if no test cases are selected, (or if they have all been excluded.)protected void printStackTrace(java.lang.Throwable t)
t - The Throwable for which to print the traceCopyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.