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

Inject @InjectComponentManager fields early in XWiki's JUnit5 Mockito extension

    Details

    • Difficulty:
      Unknown
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Right now the order in MockitoComponentManagerExtension is:

      • create empty CM
      • inject @MockComponent fields
      • handle @BeforeComponent methods
      • fill the CM with @AllComponent and @ComponentList annotations
      • handle @AfterComponent methods
      • inject @InjectMockComponents fields
      • inject @InjectComponentManager fields

      This is preventing access to @InjectComponentManager fields if you need them in @BeforeComponent methods.

        Attachments

          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: