|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
"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.
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 |
public Stimuli getStimuli()
public Responses getResponses()
public java.util.Properties getAdditionalData()
Properties
valuepublic java.lang.String getName()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |