org.apache.camel.component.mock
Class AssertionClause

java.lang.Object
  extended by org.apache.camel.component.mock.AssertionClause
All Implemented Interfaces:
Runnable

public abstract class AssertionClause
extends Object
implements Runnable

A builder of assertions on message exchanges

Version:
$Revision: 1389 $

Nested Class Summary
 class AssertionClause.PredicateValueBuilder
          Public class needed for fluent builders
 
Constructor Summary
AssertionClause()
           
 
Method Summary
protected  void addPredicate(Predicate<Exchange> predicate)
           
protected  void applyAssertionOn(MockEndpoint endpoint, int index, Exchange exchange)
          Performs any assertions on the given exchange
 AssertionClause.PredicateValueBuilder body()
          Returns a predicate and value builder for the inbound body on an exchange
<T> AssertionClause.PredicateValueBuilder
bodyAs(Class<T> type)
          Returns a predicate and value builder for the inbound message body as a specific type
 ValueBuilder<Exchange> header(String name)
          Returns a predicate and value builder for headers on an exchange
 AssertionClause.PredicateValueBuilder outBody()
          Returns a predicate and value builder for the outbound body on an exchange
<T> AssertionClause.PredicateValueBuilder
outBody(Class<T> type)
          Returns a predicate and value builder for the outbound message body as a specific type
 ExpressionClause<AssertionClause> predicate()
           
 AssertionClause predicate(Predicate<Exchange> predicate)
          Adds the given predicate to this assertion clause
 ValueBuilder<Exchange> property(String name)
          Returns a predicate and value builder for property on an exchange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 

Constructor Detail

AssertionClause

public AssertionClause()
Method Detail

predicate

public AssertionClause predicate(Predicate<Exchange> predicate)
Adds the given predicate to this assertion clause


predicate

public ExpressionClause<AssertionClause> predicate()

header

public ValueBuilder<Exchange> header(String name)
Returns a predicate and value builder for headers on an exchange


property

public ValueBuilder<Exchange> property(String name)
Returns a predicate and value builder for property on an exchange


body

public AssertionClause.PredicateValueBuilder body()
Returns a predicate and value builder for the inbound body on an exchange


bodyAs

public <T> AssertionClause.PredicateValueBuilder bodyAs(Class<T> type)
Returns a predicate and value builder for the inbound message body as a specific type


outBody

public AssertionClause.PredicateValueBuilder outBody()
Returns a predicate and value builder for the outbound body on an exchange


outBody

public <T> AssertionClause.PredicateValueBuilder outBody(Class<T> type)
Returns a predicate and value builder for the outbound message body as a specific type


applyAssertionOn

protected void applyAssertionOn(MockEndpoint endpoint,
                                int index,
                                Exchange exchange)
Performs any assertions on the given exchange


addPredicate

protected void addPredicate(Predicate<Exchange> predicate)


Copyright © 2010 IONA Open Source Community. All Rights Reserved.