Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering Apache Camel
  • Table Of Contents Toc
Mastering Apache Camel

Mastering Apache Camel

By : Jean-Baptiste Onofré
3.2 (6)
close
close
Mastering Apache Camel

Mastering Apache Camel

3.2 (6)
By: Jean-Baptiste Onofré

Overview of this book

This book is intended for all Camel users who want to get the best out of Camel, and who want to implement the most efficient integration logic using best practices.
Table of Contents (10 chapters)
close
close
9
Index

Unit test approach with the Camel test kit


Implementing a unit test basically means you bootstrap your routes—you load CamelContext and routes in the tests, and it is ready to be executed.

You now define the endpoints that you want to mock, as follows:

  1. On the mocked endpoints, you define assertions.

  2. Create and inject exchanges at some points of the routes.

  3. Check whether the assertions are verified.

Camel provides different test kits, depending on the DSL that you use to write your routes:

  • camel-test is the core and abstract test kit that you can use if you use the Java DSL.

  • camel-test-spring extends camel-test, providing support for the Spring DSL.

  • camel-test-blueprint extends camel-test as well, and provides support for the Blueprint DSL. Additionally, it also provides an OSGi like service support leveraging iPOJO.

All Camel test kits provide:

  • JUnit extensions: JUnit is the most commonly adopted unit test framework for Java, and is freely available. Instead of reinventing the wheel, Camel directly...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering Apache Camel
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon