MockPage edited by Claus IbsenChanges (2)
Full ContentMock ComponentTesting of distributed and asynchronous processing is notoriously difficult. The Mock, Test and DataSet endpoints work great with the Camel Testing Framework to simplify your unit and integration testing using Enterprise Integration Patterns and Camel's large range of Components together with the powerful Bean Integration. The Mock component provides a powerful declarative testing mechanism, which is similar to jMock in that it allows declarative expectations to be created on any Mock endpoint before a test begins. Then the test is run, which typically fires messages to one or more endpoints, and finally the expectations can be asserted in a test case to ensure the system worked as expected. This allows you to test various things like:
Note that there is also the Test endpoint which is a Mock endpoint, but which uses a second endpoint to provide the list of expected message bodies and automatically sets up the Mock endpoint assertions. In other words, it's a Mock endpoint that automatically sets up its assertions from some sample messages in a File or database, for example. URI formatmock:someName[?options] Where someName can be any string that uniquely identifies the endpoint.
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] Apache Camel > Mock confluence
- [CONF] Apache Camel > Mock confluence
- [CONF] Apache Camel > Mock confluence
- [CONF] Apache Camel > Mock confluence
- [CONF] Apache Camel > Mock confluence
- [CONF] Apache Camel > Mock confluence
- [CONF] Apache Camel > Mock confluence
- [CONF] Apache Camel > Mock confluence
