Uploaded image for project: 'Fuse Tools'
  1. Fuse Tools
  2. FUSETOOLS-47

Creating new Camel Test Case - Should add camel-test dependency

    Details

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.1.0
    • Component/s: Camel Editor
    • Labels:
      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                lhein Lars Heinemann
                Reporter:
                davsclaus Claus Ibsen
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: