public class EfsmTransitionCoverage extends TestCoverage
FULL_COVERAGE_PERCENTAGE
Constructor and Description |
---|
EfsmTransitionCoverage(Efsm efsm)
Constructs a new coverage representation for the specified EFSM.
|
EfsmTransitionCoverage(EfsmTransitionCoverage coverage)
Constructs a new coverage as a copy of the specified coverage.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Compares the specified object with this coverage for equality.
|
java.util.Set<EfsmTransition> |
getCoveredTransitions()
Returns all covered transitions in this coverage.
|
java.math.BigDecimal |
getPercentage()
Returns a percentage representation of this test coverage computed with the default precision.
|
java.math.BigDecimal |
getPercentage(int precision)
Returns a percentage representation of this test coverage computed with the specified
precision.
|
java.util.Set<EfsmTransition> |
getUncoveredTransitions()
Returns all uncovered transitions in this coverage.
|
int |
hashCode() |
void |
include(EfsmTransitionCoverage coverage)
Includes the specified coverage to this coverage.
|
boolean |
isCovered(EfsmTransition transition)
Checks if the specified transition is covered.
|
boolean |
isFull()
Tests if this coverage is full, that is, there are no uncovered transitions.
|
void |
markTransitionAsCovered(EfsmTransition coveredTransition)
Marks the specified transition as covered.
|
void |
reset()
Resets this coverage to the initial state
|
java.lang.String |
toString()
Returns a string representing this coverage.
|
public EfsmTransitionCoverage(Efsm efsm)
efsm
- the EFSM for coverage monitoringpublic EfsmTransitionCoverage(EfsmTransitionCoverage coverage)
coverage
- the coverage to be copiedpublic void markTransitionAsCovered(EfsmTransition coveredTransition) throws java.lang.IllegalArgumentException
coveredTransition
- the transition to be marked as coveredjava.lang.IllegalArgumentException
- if the specified transition is not found among the transitions
extracted from the EFSM during initialisationpublic boolean isCovered(EfsmTransition transition) throws java.lang.IllegalArgumentException
transition
- the transition to be testedtrue
if the transition is covered, otherwise returns false
java.lang.IllegalArgumentException
- if the specified transition is not found among the transitions
extracted from the EFSM during initialisationpublic java.math.BigDecimal getPercentage()
getPercentage
in class TestCoverage
public java.math.BigDecimal getPercentage(int precision)
getPercentage
in class TestCoverage
precision
- a number of decimal places in the resultpublic boolean isFull()
isFull
in class TestCoverage
true
if this coverage is full. Otherwise returns false
public java.util.Set<EfsmTransition> getCoveredTransitions()
public java.util.Set<EfsmTransition> getUncoveredTransitions()
public void reset()
TestCoverage
reset
in class TestCoverage
public void include(EfsmTransitionCoverage coverage)
coverage
- the coverage to be includedpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
EfsmTransitionCoverage
class or its subclass;
equals
in class java.lang.Object
obj
- the object to be compared for equality with this coveragetrue
if the specified object is equal to this coverage. Otherwise returns
false
public java.lang.String toString()
TestCoverage
toString
in class TestCoverage