org.apache.qpid.test.framework.distributedcircuit
Class DistributedReceiverImpl

java.lang.Object
  extended by org.apache.qpid.test.framework.distributedcircuit.DistributedReceiverImpl
All Implemented Interfaces:
Receiver

public class DistributedReceiverImpl
extends Object
implements Receiver

DistributedReceiverImpl represents the status of the receiving side of a test circuit. Its main purpose is to provide assertions that can be applied to verify the behaviour of a non-local receiver.

CRC Card
Responsibilities Collaborations
Provide assertion that the receivers received no exceptions.
Provide assertion that the receivers received all test messages sent to it.


Constructor Summary
DistributedReceiverImpl()
           
 
Method Summary
 Assertion allMessagesReceivedAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
          Provides an assertion that the receivers got all messages that were sent to it.
 Assertion channelClosedAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
          Provides an assertion that the AMQP channel was forcibly closed by an error condition.
 Assertion exceptionAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps, Class<? extends Exception> exceptionClass)
          Provides an assertion that the receiver got a given exception during the test.
 Assertion noExceptionsAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
          Provides an assertion that the receivers encountered no exceptions.
 Assertion noMessagesReceivedAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
          Provides an assertion that the receivers got none of the messages that were sent to it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributedReceiverImpl

public DistributedReceiverImpl()
Method Detail

noExceptionsAssertion

public Assertion noExceptionsAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
Provides an assertion that the receivers encountered no exceptions.

Specified by:
noExceptionsAssertion in interface Receiver
Parameters:
testProps -
Returns:
An assertion that the receivers encountered no exceptions.

allMessagesReceivedAssertion

public Assertion allMessagesReceivedAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
Provides an assertion that the receivers got all messages that were sent to it.

Specified by:
allMessagesReceivedAssertion in interface Receiver
Parameters:
testProps -
Returns:
An assertion that the receivers got all messages that were sent to it.

noMessagesReceivedAssertion

public Assertion noMessagesReceivedAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
Provides an assertion that the receivers got none of the messages that were sent to it.

Specified by:
noMessagesReceivedAssertion in interface Receiver
Parameters:
testProps -
Returns:
An assertion that the receivers got none of the messages that were sent to it.

channelClosedAssertion

public Assertion channelClosedAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
Provides an assertion that the AMQP channel was forcibly closed by an error condition.

Specified by:
channelClosedAssertion in interface Receiver
Parameters:
testProps - The test configuration properties.
Returns:
An assertion that the AMQP channel was forcibly closed by an error condition.

exceptionAssertion

public Assertion exceptionAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps,
                                    Class<? extends Exception> exceptionClass)
Provides an assertion that the receiver got a given exception during the test.

Specified by:
exceptionAssertion in interface Receiver
Parameters:
testProps -
exceptionClass - The exception class to check for. @return An assertion that the receiver got a given exception during the test.
Returns:
An assertion that the receiver got a given exception during the test.


Licensed to the Apache Software Foundation