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

Use a @Rule to configure JMock instead of extending classes

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.3
    • Fix Version/s: 4.4-rc-1
    • Labels:
      None
    • Similar issues:

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: