org.apache.camel.component.test
Class TestEndpoint

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

public class TestEndpoint
extends 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:

Field Summary
 
Fields inherited from class org.apache.camel.component.mock.MockEndpoint
copyOnExchange, reporter
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
TestEndpoint(String endpointUri, Component component, Endpoint expectedMessageEndpoint)
           
 
Method Summary
protected  void doStart()
          Implementations override this method to support customized start/stop.
protected  Object getInBody(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
addReceivedExchange, 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, expectedHeaderValuesReceivedInAnyOrder, expectedHeaderValuesReceivedInAnyOrder, 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, setRetainFirst, setRetainLast, setSleepForEmptyTest, waitForCompleteLatch, waitForCompleteLatch, whenAnyExchangeReceived, whenExchangeReceived
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, hashCode, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, toString
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, shutdown, 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, getEndpointConfiguration, getEndpointKey, getEndpointUri, setCamelContext
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Constructor Detail

TestEndpoint

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

doStart

protected void doStart()
                throws Exception
Description copied from class: ServiceSupport
Implementations override this method to support customized start/stop.

Important: See ServiceSupport.doStop() for more details.

Overrides:
doStart in class DefaultEndpoint
Throws:
Exception
See Also:
ServiceSupport.doStop()

getInBody

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



Apache CAMEL