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

Add ability to inject the CM in a field in a JUnit5 test class

    XMLWordPrintable

    Details

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

      Description

      Example:

          @InjectComponentManager
          private MockitoComponentManager componentManager;
      

      This is yet another way of getting the CM. Another way is to get it as a test method parameter.

        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: