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

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

    XMLWordPrintable

Details

    • Unknown
    • N/A

    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

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

            Dates

              Created:
              Updated:
              Resolved: