public class EUnitTest extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
UNSET_TIME |
| Constructor and Description |
|---|
EUnitTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChildren(EUnitTest child) |
List<EUnitTest> |
collectLeafTests(List selectedOperations,
EUnitTestResultType resultFilter)
Collects the leaf tests contained in this node with results of a particular type
into a new list.
|
void |
collectLeafTests(List selectedOperations,
EUnitTestResultType resultFilter,
Collection<EUnitTest> collection)
Collects the leaf tests contained in this node with results of a particular type
into the provided collection.
|
int |
countLeafTests(List selectedOperations)
Returns the number of leaf tests contained in this node.
|
int |
countLeafTests(List selectedOperations,
EUnitTestResultType resultFilter)
Returns the number of leaf tests contained in this node with results of a
particular type.
|
String |
explainAllBindings()
Returns a string explaining all the data/model bindings used in this
node, including those done in its ancestors.
|
String |
explainBinding()
Returns a string explaining the bindings (for data and for models) used
in this node.
|
List<EUnitTest> |
getAllBindings()
Returns a list of all ancestor test cases (excluding this one) with a binding.
|
String |
getCaseName()
Returns the name of the test case.
|
List<EUnitTest> |
getChildren() |
long |
getCpuTimeMillis()
Gets the CPU time used by the test, in milliseconds.
|
Object |
getDataValue() |
String |
getDataVariableName() |
long |
getEndCpuTime()
Gets the end time of the test, measured in nanoseconds of CPU time of the thread running the test.
|
long |
getEndWallclockTime()
Gets the end time of the test, as returned by
System.currentTimeMillis(). |
Exception |
getException() |
FrameStack |
getFrameStack()
Returns the frame stack with the state where the test failed.
|
String |
getMethodName()
Returns the name of the test case as it if were a JUnit method.
|
ModelBindings |
getModelBindings()
Returns the model bindings for this test.
|
Operation |
getOperation() |
String |
getOperationName()
Returns the name of the operation, or
root if this is the root of the test tree. |
EUnitTest |
getParent() |
int |
getPosition()
Returns the position of this node among its siblings: 1 if it is the
first one, 2 if it is the second one, and so on.
|
String |
getQualifiedName(String packageName)
Returns the name of this test as if it was a JUnit test method, adding
the specified package at the beginning.
|
EUnitTestResultType |
getResult() |
long |
getStartCpuTime()
Gets the start time of the test, measured in nanoseconds of CPU time of the thread running the test.
|
long |
getStartWallclockTime()
Gets the start time of the test, as returned by
System.currentTimeMillis(). |
long |
getWallclockTimeMillis()
Gets the wallclock time used by the test, in milliseconds.
|
boolean |
isLeafTest()
Returns
true iff this test has no children. |
boolean |
isRootTest()
Returns
true iff this test is the root of the test tree. |
boolean |
isSelected(List selectedOperations)
Returns
true if this test case should be run with a certain list
of selected operations to be tested. |
void |
setDataValue(Object dataValue) |
void |
setDataVariableName(String dataVariable) |
void |
setEndCpuTime(long endCpuTime)
Gets the end time of the test, measured in nanoseconds of CPU time of the thread running the test.
|
void |
setEndWallclockTime(long endWallclockTime)
Sets the end time of the test, as returned by
System.currentTimeMillis(). |
void |
setException(Exception exception) |
void |
setFrameStack(FrameStack frameStack)
Stores the frame stack storing the state of the EOL program when the error or failure
happened.
|
void |
setModelBindings(ModelBindings mb)
Changes the set of model bindings for this test.
|
void |
setOperation(Operation operation) |
void |
setParent(EUnitTest parent) |
void |
setResult(EUnitTestResultType result) |
void |
setStartCpuTime(long startCpuTime)
Sets the start time of the test, measured in nanoseconds of CPU time of the thread running the test.
|
void |
setStartWallclockTime(long startWallclockTime)
Sets the start time of the test, as returned by
System.currentTimeMillis(). |
String |
toString() |
public static final long UNSET_TIME
public Operation getOperation()
public void setOperation(Operation operation)
public EUnitTestResultType getResult()
public void setResult(EUnitTestResultType result)
public Exception getException()
public void setException(Exception exception)
public EUnitTest getParent()
public void setParent(EUnitTest parent)
public String getDataVariableName()
public void setDataVariableName(String dataVariable)
public Object getDataValue()
public void setDataValue(Object dataValue)
public void addChildren(EUnitTest child)
public void setStartCpuTime(long startCpuTime)
public long getStartCpuTime()
public void setEndCpuTime(long endCpuTime)
public long getEndCpuTime()
public long getCpuTimeMillis()
public long getStartWallclockTime()
System.currentTimeMillis().public void setStartWallclockTime(long startWallclockTime)
System.currentTimeMillis().public long getEndWallclockTime()
System.currentTimeMillis().public void setEndWallclockTime(long endWallclockTime)
System.currentTimeMillis().public long getWallclockTimeMillis()
public void setFrameStack(FrameStack frameStack)
public FrameStack getFrameStack()
public int getPosition()
public String getOperationName()
root if this is the root of the test tree.public String getCaseName()
public String getMethodName()
@data operation and the
second value returned by the second @data operation.
Note: test cases with only one model binding do not get [1] at the end,
to clean up the output a bit.public String explainBinding()
public String explainAllBindings()
public List<EUnitTest> getAllBindings()
public String getQualifiedName(String packageName)
packageName - Package name (as set in the EUnitModule).public int countLeafTests(List selectedOperations)
public int countLeafTests(List selectedOperations, EUnitTestResultType resultFilter)
public List<EUnitTest> collectLeafTests(List selectedOperations, EUnitTestResultType resultFilter)
public void collectLeafTests(List selectedOperations, EUnitTestResultType resultFilter, Collection<EUnitTest> collection)
public boolean isSelected(List selectedOperations)
true if this test case should be run with a certain list
of selected operations to be tested.public boolean isLeafTest()
true iff this test has no children.public boolean isRootTest()
true iff this test is the root of the test tree.public void setModelBindings(ModelBindings mb) throws EolRuntimeException
EolRuntimeException - The map includes a key or a value that is not a String.public ModelBindings getModelBindings()
null. This map cannot be
changed: if you want to make changes to it, you'll need to make a copy.
Trying to change it will throw an UnsupportedOperationException.Copyright © 2016. All rights reserved.