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

Introduce a MockitoComponentMockingRule to replace AbstractMockingComponentTestCase

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 4.3.1
    • 4.3
    • None

    Description

      See also XCOMMONS-317 and XCOMMONS-318

      Usage:

      @ComponentList({DefaultDiffManager.class})
      public class DefaultDiffManagerTest
      {
          @Rule
          public final MockitoComponentMockingRule<DiffManager> mocker =
              new MockitoComponentMockingRule(DefaultDiffManager.class);
      ...
          @Test
          public void testDiffStringList() throws Exception
          {
              // Null
      
              DiffResult<String> result = this.mocker.getMockedComponent().diff(null, null, null);
      ...
      

      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: