org.apache.camel.component.test
Class TestEndpoint

java.lang.Object
  extended by org.apache.camel.impl.DefaultEndpoint<Exchange>
      extended by org.apache.camel.component.mock.MockEndpoint
          extended by org.apache.camel.component.test.TestEndpoint
All Implemented Interfaces:
CamelContextAware, Endpoint<Exchange>, Service, BrowsableEndpoint<Exchange>

public class TestEndpoint
extends MockEndpoint
implements Service

A Test Endpoint is a Mock Endpoint for testing but it will pull all messages from the nested endpoint and use those as expected message body assertions.

Version:
$Revision: 655516 $

Constructor Summary
TestEndpoint(String endpointUri, Component component, Endpoint expectedMessageEndpoint)
           
TestEndpoint(String endpointUri, Endpoint expectedMessageEndpoint)
           
 
Method Summary
protected  Object getInBody(Exchange exchange)
          This method allows us to convert or coerce the expected message body into some other type
 void start()
           
 void stop()
           
 
Methods inherited from class org.apache.camel.component.mock.MockEndpoint
addPropertyChangeListener, allMessages, assertEquals, assertExchangeReceived, assertIsNotSatisfied, assertIsSatisfied, assertIsSatisfied, assertIsSatisfied, assertIsSatisfied, assertIsSatisfied, assertMessagesAscending, assertMessagesDescending, assertMessagesSorted, assertNoDuplicates, assertTrue, assertWait, await, await, createConsumer, createProducer, expectedBodiesReceived, expectedBodiesReceived, expectedBodiesReceivedInAnyOrder, expectedBodiesReceivedInAnyOrder, expectedHeaderReceived, expectedMessageCount, expectedMinimumMessageCount, expects, expectsAscending, expectsDescending, expectsMessageCount, expectsNoDuplicates, fail, getExchanges, getExpectedCount, getExpectedMinimumCount, getFailures, getReceivedCounter, getReceivedExchanges, getReporter, getResultWaitTime, getSleepForEmptyTest, isSingleton, message, onExchange, performAssertions, removePropertyChangeListener, reset, resolve, setExpectedMessageCount, setMinimumExpectedMessageCount, setReporter, setResultWaitTime, setSleepForEmptyTest, waitForCompleteLatch, whenAnyExchangeReceived, whenExchangeReceived
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureProperties, convertTo, createEndpointUri, createExchange, createExchange, createExchange, createExecutorService, createPollingConsumer, equals, getCamelContext, getComponent, getContext, getEndpointUri, getExchangePattern, getExchangeType, getExecutorService, hashCode, isLenientProperties, setCamelContext, setContext, setEndpointUri, setExchangePattern, setExecutorService, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Endpoint
configureProperties, createExchange, createExchange, createExchange, createPollingConsumer, getCamelContext, getContext, getEndpointUri, isLenientProperties, setCamelContext, setContext
 

Constructor Detail

TestEndpoint

public TestEndpoint(String endpointUri,
                    Component component,
                    Endpoint expectedMessageEndpoint)

TestEndpoint

public TestEndpoint(String endpointUri,
                    Endpoint expectedMessageEndpoint)
Method Detail

start

public void start()
           throws Exception
Specified by:
start in interface Service
Throws:
Exception

stop

public void stop()
          throws Exception
Specified by:
stop in interface Service
Throws:
Exception

getInBody

protected Object getInBody(Exchange exchange)
This method allows us to convert or coerce the expected message body into some other type



Copyright © 2008 Apache Software Foundation. All Rights Reserved.