org.apache.camel.component.mock
Class AssertionClause<E extends Exchange>

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

public abstract class AssertionClause<E extends Exchange>
extends Object
implements Runnable

A builder of assertions on message exchanges

Version:
$Revision: 1.1 $

Nested Class Summary
 class AssertionClause.PredicateValueBuilder
           
 
Constructor Summary
AssertionClause()
           
 
Method Summary
protected  void addPredicate(Predicate<E> predicate)
           
protected  void applyAssertionOn(MockEndpoint endpoint, int index, E 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<E> 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
 AssertionClause<E> predicate(Predicate<E> predicate)
          Adds the given predicate to this assertion clause
 
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<E> predicate(Predicate<E> predicate)
Adds the given predicate to this assertion clause


header

public ValueBuilder<E> header(String name)
Returns a predicate and value builder for headers 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,
                                E exchange)
Performs any assertions on the given exchange


addPredicate

protected void addPredicate(Predicate<E> predicate)


Copyright © 2007 Apache Software Foundation. All Rights Reserved.