com.reuters.msgtest.fixture
Interface RvFixture

All Known Implementing Classes:
BaseRvFixture, LoadTestFixture

public interface RvFixture

"Tests need to run against the background of a known set of objects. This set of objects is called a test fixture. When you are writing tests you will often find that you spend more time writing the code to set up the fixture than you do in actually testing values." taken from JUnit Cookbook For testing of Message Oriented Middleware the fixtures are the messages that will be sent out to stimulate the system and also the expected response messages. These two types of messages are represented by the classes Stimuli and Responses. By having all fixture classes implement this interface we can reuse the fixture code made at the server unit test level with the integration and load tests. This requires having known method signatures to invoke on a Fixture class. Additional non message related properites, such as represented in a simple java.util.Properties file are a possible addition to this class. We allow for the propagation of TibrvExceptions out of the local block just to make writing the fixture easier, no try-catch blocks necessary. These are handled by the JUnit framework so they will be handled elegantly. The separation into two methods, create and get is to force you to write a fixture that does not return a new instance on each invokation. This is so the same fixture can be modified by multiple tests.

Version:
@VERSION@
Author:
Mark Pollack

Method Summary
 java.util.Properties getAdditionalData()
          Other data that might be used during the test and know in advance.
 java.lang.String getName()
           
 Responses getResponses()
          Retrieve the response messages created in createResponses
 Stimuli getStimuli()
          Retrieve the stimulus messages created in makeStimului.
 

Method Detail

getStimuli

public Stimuli getStimuli()
Retrieve the stimulus messages created in makeStimului.

Returns:
a Map of stimulus messages, the values are of type TibrvMsg

getResponses

public Responses getResponses()
Retrieve the response messages created in createResponses

Returns:
an object with the expected messages, the values are of type TibrvMsg.

getAdditionalData

public java.util.Properties getAdditionalData()
Other data that might be used during the test and know in advance. Data that is not of the type rv message can be placed here as key value pairs. It is indended that you use string key values pairs for storage reasons but it is not required.

Returns:
a Properties value

getName

public java.lang.String getName()
Returns:
The name of this fixture


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