Details
-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
Description
When you use the create Camel Test Case, to create a junit test for your Camel app. Then at some point in the wizard it suggest to add JUnit 4 to the "classpath".
1)
I think the first problem is that junit could already be added as a "Maven dependency".
<!-- for testing --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency>
Which I already have.
2)
I have problem selecting the Camel XML file I want to use for creating an unit test.
If I select it using the wizard, the selection is not "returned" back to the main wizard. And thus its empty.
If I manually type the XML file name, it doesn't matter.
3)
The generated source may look like (code to load XML file is not present, could be because of #2)
package org.apache.camel.example.spring; import static org.junit.Assert.*; import org.apache.camel.test.junit4.CamelSpringTestSupport; public class MyCoolTest extends CamelSpringTestSupport { }
The import org.apache.camel.test.junit4.CamelSpringTestSupport; is from camel-test component.
So if the wizard could suggest or auto-add that dependency. But it should be added to the maven dependency in the pom.xml file.
I dont know if that is ever possible, as maven isn't native supported in eclipse.