Class TestInstanceInjectionExtension<T>

  • All Implemented Interfaces:
    jakarta.enterprise.inject.spi.Extension

    public class TestInstanceInjectionExtension<T>
    extends Object
    implements jakarta.enterprise.inject.spi.Extension
    Extension that makes a test instance appear like a regular bean even though instantiated by JUnit. Injection into all test instances, also @Nested ones, is handled in WeldInitiator.addObjectsToInjectInto(java.util.Set<java.lang.Object>) and related. Proper handling of all other CDI annotations such as @Produces is supported only on top level test classes.