org.apache.camel.component.test
Class TestEndpoint

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

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: 817970 $

Constructor Summary
TestEndpoint(String endpointUri, Component component, 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
allMessages, assertEquals, assertExchangeReceived, assertIsNotSatisfied, assertIsNotSatisfied, assertIsSatisfied, assertIsSatisfied, assertIsSatisfied, assertIsSatisfied, assertIsSatisfied, assertIsSatisfied, assertMessagesAscending, assertMessagesDescending, assertMessagesSorted, assertNoDuplicates, assertTrue, assertWait, await, await, createConsumer, createProducer, expectedBodiesReceived, expectedBodiesReceived, expectedBodiesReceivedInAnyOrder, expectedBodiesReceivedInAnyOrder, expectedBodyReceived, expectedFileExists, expectedFileExists, expectedHeaderReceived, expectedMessageCount, expectedMinimumMessageCount, expectedPropertyReceived, expects, expectsAscending, expectsAscending, expectsDescending, expectsDescending, expectsMessageCount, expectsNoDuplicates, expectsNoDuplicates, fail, getExchanges, getExpectedCount, getExpectedMinimumCount, getFailures, getReceivedCounter, getReceivedExchanges, getReporter, getResultWaitTime, getSleepForEmptyTest, handle, isSingleton, message, onExchange, performAssertions, reset, resetMocks, resolve, setExpectedMessageCount, setMinimumExpectedMessageCount, setMinimumResultWaitTime, setReporter, setResultWaitTime, setSleepForEmptyTest, waitForCompleteLatch, waitForCompleteLatch, whenAnyExchangeReceived, whenExchangeReceived
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureProperties, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, hashCode, isLenientProperties, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, 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, getEndpointKey, getEndpointUri, isLenientProperties, setCamelContext
 

Constructor Detail

TestEndpoint

public TestEndpoint(String endpointUri,
                    Component component,
                    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 © 2007-2010 The Apache Software Foundation. All Rights Reserved.