public class TestSequence extends Sequence implements java.lang.Comparable<TestSequence>
A TestSequence may optionally be merged with shorter TestSequences that are a prefix of this TestSequence. In this case, multiple TestSteps may be verified, and this TestSequence represents a multi-objective test. TestSequences are comparable objects that can be sorted according to their precedence during testing. By default, shorter TestSequences precede longer tests; but multi-objective TestSequences precede other tests if they verify more objectives. This property ensures that testing is properly ordered, such that fundamental system properties are tested before dependent properties.
| Constructor and Description |
|---|
TestSequence()
Constructs an empty TestSequence.
|
TestSequence(Sequence sequence)
Constructs an empty TestSequence covering the same state and path as
the coverage Sequence.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(TestSequence other)
Compares one TestSequence with another, as part of a sorting algorithm.
|
int |
countVerify()
Counts the number of verified TestSteps in this TestSequence.
|
TestSequence |
doVerify()
Verify the outcome of this TestSequence.
|
java.lang.String |
getSource()
Returns the name of the expected source State.
|
java.lang.String |
getTarget()
Returns the name of the expected target State.
|
int |
getTest()
Returns the test index of this TestSequence.
|
java.util.List<TestStep> |
getTestSteps()
Returns the ordered list of TestSteps.
|
boolean |
hasFailures()
Reports whether this TestSequence can possibly raise anticipated
Exceptions.
|
boolean |
hasPrefix(TestSequence other)
Reports whether this TestSequence contains the other as a prefix.
|
boolean |
mergePrefix(TestSequence prefix)
Optionally merges a prefix TestSequence with this TestSequence.
|
void |
receive(Grounding grounding)
Receive a Grounding generator for grounding this TestSequence.
|
TestSequence |
setTest(int test)
Sets the test index of this TestSequence.
|
addEvent, addSequence, equals, getEvents, getFirstEvent, getLastEvent, getPath, getState, hashCode, isEmpty, setPath, setState, sizesafeEquals, safeHashCode, semanticErrorpublic TestSequence()
public TestSequence(Sequence sequence)
sequence - a coverage Sequence.public int getTest()
public TestSequence setTest(int test)
test - the test index to set.public java.util.List<TestStep> getTestSteps()
public boolean hasFailures()
public boolean hasPrefix(TestSequence other)
other - the other TestSequencepublic boolean mergePrefix(TestSequence prefix)
prefix - the prefix TestSequence.public TestSequence doVerify()
public java.lang.String getSource()
public java.lang.String getTarget()
public int countVerify()
public int compareTo(TestSequence other)
compareTo in interface java.lang.Comparable<TestSequence>other - the other TestSequence.Comparable.compareTo(java.lang.Object)public void receive(Grounding grounding)
grounding - a Grounding generator.