org.apache.qpid.interop.clienttestcases
Class TestCase1DummyRun

java.lang.Object
  extended by org.apache.qpid.interop.clienttestcases.TestCase1DummyRun
All Implemented Interfaces:
org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest

public class TestCase1DummyRun
extends Object
implements org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest

Implements tet case 1, dummy run. This test case sends no test messages, it exists to confirm that the test harness is interacting with the coordinator correctly.

CRC Card
Responsibilities Collaborations
Supply the name of the test case that this implements.
Accept/Reject invites based on test parameters.
Adapt to assigned roles.
Perform test case actions.
Generate test reports.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest
org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest.Roles
 
Constructor Summary
TestCase1DummyRun()
           
 
Method Summary
 boolean acceptInvite(Message inviteMessage)
          Determines whether the test invite that matched this test case is acceptable.
 void assignRole(org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest.Roles role, Message assignRoleMessage)
          Assigns the role to be played by this test case.
 String getName()
          Should provide the name of the test case that this class implements.
 Message getReport(Session session)
          Gets a report on the actions performed by the test case in its assigned role.
 void onMessage(Message message)
          Handles incoming test messages.
 void start(int numMessages)
          Performs the test case actions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestCase1DummyRun

public TestCase1DummyRun()
Method Detail

getName

public String getName()
Should provide the name of the test case that this class implements. The exact names are defined in the interop testing spec.

Specified by:
getName in interface org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest
Returns:
The name of the test case that this implements.

acceptInvite

public boolean acceptInvite(Message inviteMessage)
                     throws JMSException
Determines whether the test invite that matched this test case is acceptable.

Specified by:
acceptInvite in interface org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest
Parameters:
inviteMessage - The invitation to accept or reject.
Returns:
true to accept the invitation, false to reject it.
Throws:
JMSException - Any JMSException resulting from reading the message are allowed to fall through.

assignRole

public void assignRole(org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest.Roles role,
                       Message assignRoleMessage)
                throws JMSException
Assigns the role to be played by this test case. The test parameters are fully specified in the assignment message. When this method return the test case will be ready to execute.

Specified by:
assignRole in interface org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest
Parameters:
role - The role to be played; sender or receivers.
assignRoleMessage - The role assingment message, contains the full test parameters.
Throws:
JMSException - Any JMSException resulting from reading the message are allowed to fall through.

start

public void start(int numMessages)
Performs the test case actions. Returning from here, indicates that the sending role has completed its test.

Specified by:
start in interface org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest
Parameters:
numMessages - The number of test messages to send.

getReport

public Message getReport(Session session)
                  throws JMSException
Gets a report on the actions performed by the test case in its assigned role.

Specified by:
getReport in interface org.apache.qpid.test.framework.distributedtesting.TestClientControlledTest
Parameters:
session - The controlSession to create the report message in.
Returns:
The report message.
Throws:
JMSException - Any JMSExceptions resulting from creating the report are allowed to fall through.

onMessage

public void onMessage(Message message)
Handles incoming test messages. Does nothing.

Parameters:
message - The incoming test message.


Licensed to the Apache Software Foundation