rhtconsulting / fuse-quickstarts

Quick Starts and Demos intended for use with JBoss Fuse (both on EAP and Karaf) put together by a team of Red Hat Consultants
http://www.redhat.com/en/services/consulting
Apache License 2.0
26 stars 34 forks source link

Testing #53

Closed raulsperoni closed 6 years ago

raulsperoni commented 8 years ago

Hi, i have a question, how would you unit test the jpa example in this repo? I'm really stuck trying to do so with a similar route.

Thank you!

bsaunder commented 8 years ago

I generally would use the Camel Mock (https://camel.apache.org/mock.html) component to mock that particular endpoint in my route, or replace it with a Log endpoint.

you can also us PaxExam but that is more of an integration test and its much more complex.

raulsperoni commented 8 years ago

Yes i tried that but i'm facing lots of problems...i posted a question in stackoverflow, no luck yet. http://stackoverflow.com/questions/39876105/test-existing-apache-camel-route thanks.