Class DestroyingDependentInstanceTest

  • All Implemented Interfaces:
    org.testng.IHookable, org.testng.ITestNGListener

    @SpecVersion(spec="cdi",
                 version="2.0")
    public class DestroyingDependentInstanceTest
    extends AbstractTest
    Test for CDI-139. It verifies that Instance.destroy() can be used to destroy a dependent bean instance and bean instances depending on the bean instance are destroyed as well.

    This test was originally part of the Weld test suite.

    Author:
    Jozef Hartinger, Martin Kouba
    • Constructor Detail

      • DestroyingDependentInstanceTest

        public DestroyingDependentInstanceTest()
    • Method Detail

      • createTestArchive

        @Deployment
        public static org.jboss.shrinkwrap.api.spec.WebArchive createTestArchive()
      • testDestroyingDependentInstances

        @SpecAssertions(@SpecAssertion(section="dynamic_lookup",id="n"))
        public void testDestroyingDependentInstances​(jakarta.enterprise.inject.Instance<Foo> instance)
      • testDestroyingInterceptedDependentBean

        @SpecAssertions(@SpecAssertion(section="dynamic_lookup",id="n"))
        public void testDestroyingInterceptedDependentBean​(jakarta.enterprise.inject.Instance<Bar> instance)