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

@Inject in @ComponentTest tests doesn't work with generic types

    XMLWordPrintable

Details

    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce:

      Create an @ComponentTest with an @Inject with a generic component type. For example with @ReferenceComponentList and

          @Inject
          private EntityReferenceSerializer<String> serializer;
      

      Expected result:

      The component is injected.

      Actual result:

      An error org.xwiki.component.manager.ComponentLookupException: Can't find descriptor for the component with type [interface org.xwiki.model.reference.EntityReferenceSerializer] and hint [null] is displayed. Note that the <String> part is missing.

      Attachments

        Issue Links

          Activity

            People

              MichaelHamann Michael Hamann
              MichaelHamann Michael Hamann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: