Uploaded image for project: 'SwitchYard'
  1. SwitchYard
  2. SWITCHYARD-348

Change SwitchYard testing from extension of SwitchYardTestCase to using @RunWith(SwitchYardRunner.class)

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 0.2
    • Component/s: component-camel, test
    • Labels:
      None

      Description

      Camel provides test support via extension of it's base TestCase classes. Would be nice to make this available to SwitchYard users, along with the existing test MixIn functionality.

      I looked at adding the base camel test class as a MixIn i.e. the users test class would not actually extend the base camel test class. I don't think this is going to work however because of all the camel test annotations etc. It really needs to be hooked in properly into the test by extension, as designed.

      Our tests having to extend the SwitchYardTestCase is kinda getting in the way here I think. I'm actually starting to think it may be better to provide our MixIns, Scanners etc as annotated properties on the test class, using a TestRunner to wire it all up. I also think this will help us evolve towards tighter integration with Arquillian.

      Something like...

      @RunWith(SwitchYardRunner.class)
      public class CoolTest {
      
          @MixIn
          private CDIMixIn cdiMixIn;
      
          // etc...
      }
      

      Then the test can be extended by the camel test classes.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tfennelly Tom Fennelly
                Reporter:
                tfennelly Tom Fennelly
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: