org.apache.camel.component.test
Class TestEndpoint

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      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:
org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.BrowsableEndpoint, org.apache.camel.spi.HasId

public class TestEndpoint
extends org.apache.camel.component.mock.MockEndpoint

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:

Constructor Summary
TestEndpoint(String endpointUri, org.apache.camel.Component component, org.apache.camel.Endpoint expectedMessageEndpoint)
           
 
Method Summary
protected  void doStart()
           
protected  Object getInBody(org.apache.camel.Exchange exchange)
          This method allows us to convert or coerce the expected message body into some other type
 
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, doAssertIsSatisfied, expectedBodiesReceived, expectedBodiesReceived, expectedBodiesReceivedInAnyOrder, expectedBodiesReceivedInAnyOrder, expectedBodyReceived, expectedExchangePattern, expectedFileExists, expectedFileExists, expectedHeaderReceived, expectedMessageCount, expectedMessagesMatches, expectedMinimumMessageCount, expectedPropertyReceived, expects, expectsAscending, expectsAscending, expectsDescending, expectsDescending, expectsMessageCount, expectsNoDuplicates, expectsNoDuplicates, fail, getExchanges, getExpectedCount, getExpectedMinimumCount, getFailures, getReceivedCounter, getReceivedExchanges, getReporter, getResultWaitTime, getSleepForEmptyTest, handle, isLenientProperties, isSingleton, message, onExchange, performAssertions, reset, resetMocks, resolve, returnReplyBody, returnReplyHeader, setAssertPeriod, setAssertPeriod, 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, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, getId, hashCode, isSynchronous, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, toString
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, start, stop, suspend
 
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, setCamelContext
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Constructor Detail

TestEndpoint

public TestEndpoint(String endpointUri,
                    org.apache.camel.Component component,
                    org.apache.camel.Endpoint expectedMessageEndpoint)
Method Detail

doStart

protected void doStart()
                throws Exception
Overrides:
doStart in class org.apache.camel.impl.DefaultEndpoint
Throws:
Exception

getInBody

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



Apache CAMEL