return new AssertionBase()
{
public boolean apply()
{
boolean passed = true;
ExceptionMonitor connectionExceptionMonitor = circuit.getConnectionExceptionMonitor();
if (!connectionExceptionMonitor.assertOneJMSExceptionWithLinkedCause(AMQNoConsumersException.class))
{
passed = false;
addError("Was expecting linked exception type " + AMQNoConsumersException.class.getName()
+ " on the connection.\n");
addError((connectionExceptionMonitor.size() > 0)
? ("Actually got the following exceptions on the connection, " + connectionExceptionMonitor)
: "Got no exceptions on the connection.");
}
return passed;