nz.ac.waikato.modeljunit
Class StopOnFailureListener

java.lang.Object
  extended by nz.ac.waikato.modeljunit.AbstractListener
      extended by nz.ac.waikato.modeljunit.StopOnFailureListener
All Implemented Interfaces:
ModelListener

public class StopOnFailureListener
extends AbstractListener

An implementation of ModelListener that throws an exception when the first test failure is detected.


Field Summary
 
Fields inherited from class nz.ac.waikato.modeljunit.AbstractListener
model_
 
Constructor Summary
StopOnFailureListener()
           
 
Method Summary
 void failure(TestFailureException ex)
          The Model calls this when an action has found an error.
 java.lang.String getName()
          Get the short name that this listener is known by.
 
Methods inherited from class nz.ac.waikato.modeljunit.AbstractListener
doneGuard, doneReset, doneTransition, getModel, setModel, startAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StopOnFailureListener

public StopOnFailureListener()
Method Detail

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.


failure

public void failure(TestFailureException ex)
Description copied from interface: ModelListener
The Model calls this when an action has found an error. The failure exception contains lots of information about the test failure. If a listener throws this exception, then the test generation process will stop with this exception. (after all listeners have been notified of the failure).

Specified by:
failure in interface ModelListener
Overrides:
failure in class AbstractListener


Copyright © 2009 ModelJUnit Project. All Rights Reserved.