nz.ac.waikato.modeljunit
Class VerboseListener

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

public class VerboseListener
extends AbstractListener

An implementation of ModelListener that prints event messages to the Model's getOutput() stream.


Field Summary
 
Fields inherited from class nz.ac.waikato.modeljunit.AbstractListener
model_
 
Constructor Summary
VerboseListener()
           
VerboseListener(Model model)
          Deprecated. Use the null constructor instead.
 
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.
 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, getModel, setModel, startAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VerboseListener

public VerboseListener()

VerboseListener

public VerboseListener(Model model)
Deprecated. Use the null constructor instead.

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.


doneReset

public void doneReset(java.lang.String reason,
                      boolean testing)
Description copied from interface: ModelListener
The Model calls this after each reset(boolean) action.

Specified by:
doneReset in interface ModelListener
Overrides:
doneReset in class AbstractListener
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.

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.