Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-317

Use a @Rule to configure JMock instead of extending classes

    XMLWordPrintable

Details

    Description

      In general we need to stop configuring JUnit tests by extending classes and instead only use the the Rule mechanism. This makes it easier to reuse rule in different contexts and allows tests to extend other tests more easily.

      The new way to configure JMock for a test not testing components will be:

      @Rule
      public final JMockRule mockery = new JMockRule();
      

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: