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

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

public class DistributedPublisherImpl
extends Object
implements Publisher

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

CRC Card
Responsibilities Collaborations
Provide assertion that the publishers received no exceptions.
Provide assertion that the publishers received a no consumers error code on every message.
Provide assertion that the publishers received a no route error code on every message.


Constructor Summary
DistributedPublisherImpl()
           
 
Method Summary
 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 publisher got a given exception during the test.
 Assertion noConsumersAssertion()
          Provides an assertion that the publisher got a no consumers exception on every message.
 Assertion noExceptionsAssertion(org.apache.qpid.junit.extensions.util.ParsedProperties testProps)
          Provides an assertion that the publisher encountered no exceptions.
 Assertion noRouteAssertion()
          Provides an assertion that the publisher got a no rout exception on every message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributedPublisherImpl

public DistributedPublisherImpl()
Method Detail

noExceptionsAssertion

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

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

noConsumersAssertion

public Assertion noConsumersAssertion()
Provides an assertion that the publisher got a no consumers exception on every message.

Returns:
An assertion that the publisher got a no consumers exception on every message.

noRouteAssertion

public Assertion noRouteAssertion()
Provides an assertion that the publisher got a no rout exception on every message.

Returns:
An assertion that the publisher got a no rout exception on every message.

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 Publisher
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 publisher got a given exception during the test.

Specified by:
exceptionAssertion in interface Publisher
Parameters:
testProps - The test configuration properties.
exceptionClass - The exception class to check for.
Returns:
An assertion that the publisher got a given exception during the test.


Licensed to the Apache Software Foundation