nz.ac.waikato.modeljunit.coverage
Class TransitionPairCoverage
java.lang.Object
nz.ac.waikato.modeljunit.AbstractListener
nz.ac.waikato.modeljunit.coverage.AbstractCoverage
nz.ac.waikato.modeljunit.coverage.TransitionPairCoverage
- All Implemented Interfaces:
- CoverageMetric, ModelListener
public class TransitionPairCoverage
- extends AbstractCoverage
Measures the number of distinct Actions that have been tested.
Method Summary |
void |
doneReset(java.lang.String reason,
boolean testing)
The Model calls this after each reset(boolean) action. |
void |
doneTransition(int action,
Transition tr)
The Model calls this after taking each transition. |
java.lang.String |
getDescription()
A medium-length description of this coverage metric. |
java.lang.String |
getName()
Get the short name that this listener is known by. |
void |
setGraph(InspectableGraph model,
java.util.Map<java.lang.Object,Vertex> state2vertex)
A default implementation that does nothing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TransitionPairCoverage
public TransitionPairCoverage()
getName
public java.lang.String getName()
- Description copied from interface:
ModelListener
- Get the short name that this listener is known by.
This name is used to add a listener to a model or
a Tester object and to lookup a listener.
The name should be a short descriptive noun phrase,
all in lowercase, should usually be less than 30 characters,
and may contain spaces.
getDescription
public java.lang.String getDescription()
- Description copied from interface:
CoverageMetric
- A medium-length description of this coverage metric.
This should be a sentence or paragraph suitable for
displaying as pop-up documentation, to explain the metric.
For example, a state coverage metric might return
"The number of different FSM states visited.".
setGraph
public void setGraph(InspectableGraph model,
java.util.Map<java.lang.Object,Vertex> state2vertex)
- Description copied from class:
AbstractCoverage
- A default implementation that does nothing.
- Specified by:
setGraph
in interface CoverageMetric
- Overrides:
setGraph
in class AbstractCoverage
doneReset
public void doneReset(java.lang.String reason,
boolean testing)
- Description copied from class:
AbstractCoverage
- The Model calls this after each reset(boolean) action.
The default implementation does nothing.
- Specified by:
doneReset
in interface ModelListener
- Overrides:
doneReset
in class AbstractCoverage
- Parameters:
reason
- An adjective that describe why the reset was done.testing
- The parameter that was passed to the FsmModel reset call.
doneTransition
public void doneTransition(int action,
Transition tr)
- Description copied from interface:
ModelListener
- The Model calls this after taking each transition.
- Specified by:
doneTransition
in interface ModelListener
- Overrides:
doneTransition
in class AbstractListener
- Parameters:
action
- The number of the action just taken.tr
- The transition just taken.
Copyright © 2009 ModelJUnit Project. All Rights Reserved.