com.reuters.msgtest.fixture
Class Stimuli

java.lang.Object
  extended bycom.reuters.msgtest.fixture.Stimuli

public class Stimuli
extends java.lang.Object

This class represents a collection of Stimulus messages that will be created as part of the fixture for the test. It allows type safe access to a list of Stimulus messages. There is also a time delay that instructs the testing classes to wait for that amount of time after sending all of the stimulus messages. The default value for the delay is 1 second.

Version:
@VERSION@
Author:
Mark Pollack, Michael Ward
See Also:
RvFixture, Stimulus

Field Summary
protected  java.util.List stimulusList
           
 
Constructor Summary
Stimuli()
           
 
Method Summary
 void addAll(java.util.List list)
           
 void addStimulus(Stimulus stimulus)
          Add a Stimulus to the collection.
 Stimulus getStimulus(int i)
          Return a Stimulus from the collection.
 Stimulus getStimulus(java.lang.String name)
          Return a Stimulus from the collection with a given name.
 void handleStimulus(Stimulus stimulus)
          This method is called from the digester
 java.util.Iterator iterator()
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stimulusList

protected java.util.List stimulusList
Constructor Detail

Stimuli

public Stimuli()
Method Detail

addStimulus

public void addStimulus(Stimulus stimulus)
Add a Stimulus to the collection. It is possible to add two stimulus message with the same name, but this should be avoided if you want retrieve later by name.

Parameters:
stimulus - a Stimulus value

handleStimulus

public void handleStimulus(Stimulus stimulus)
This method is called from the digester


getStimulus

public Stimulus getStimulus(int i)
Return a Stimulus from the collection.

Parameters:
i - an int value
Returns:
a Stimulus value

getStimulus

public Stimulus getStimulus(java.lang.String name)
                     throws RvTestException
Return a Stimulus from the collection with a given name. It returns the first match if successful and null if no match was found.

Parameters:
name - The name of a Stimulus to retrieve.
Returns:
The first matching stimulus if successful or null otherwise.
Throws:
RvTestException

iterator

public java.util.Iterator iterator()

size

public int size()

addAll

public void addAll(java.util.List list)


Copyright © 2002-2004 The RVTest Team. All Rights Reserved.