camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gert Villemos <gville...@yahoo.de>
Subject Conceptual 'correctness' of using Camel Unit Tests
Date Thu, 05 May 2011 08:56:53 GMT
Some would argue that a unit test per definition tests the unit completely
standalone. Using JUnit this is easy, especially when combined with Spring,
i.e. you can isolate your bean and test each method directly.

The Camel Junit on the other hand test the unit as part of a camle route.
Even if the route is very simple such as

<route>
  <from uri="direct:in"/>
  <to uri="bean:myBean"/>
  <to uri="mock:out"/>
</route>

Still, It's testing my bean in a context that is more than just using the
bean methods.

The Camel in Action book 'only' list on benefit of using Camel Junit tests,
namely simplification of the unit tests. I would like to hear what the rest
of you do / think. 

- Do you use only Camel Junit tests using routes?

- Do  you use 'normal' method oriented JUnit tests for low level tests of
individual methods combined with Camel Unit tests for
'component/application' level testing?

- Do you see a conceptual problem in unit testing using Camel JUnit?

--
View this message in context: http://camel.465427.n5.nabble.com/Conceptual-correctness-of-using-Camel-Unit-Tests-tp4372286p4372286.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message