Class DisposalMethodDefinitionTest

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

    @SpecVersion(spec="cdi",
                 version="2.0")
    public class DisposalMethodDefinitionTest
    extends AbstractTest
    • Constructor Detail

      • DisposalMethodDefinitionTest

        public DisposalMethodDefinitionTest()
    • Method Detail

      • createTestArchive

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

        @SpecAssertion(section="method_constructor_parameter_qualifiers",id="c") @SpecAssertion(section="disposer_method",id="b") @SpecAssertion(section="disposer_method",id="c") @SpecAssertion(section="disposer_method",id="e") @SpecAssertion(section="disposer_method_disposed_parameter",id="ba") @SpecAssertion(section="declaring_disposer_method",id="a") @SpecAssertion(section="declaring_disposer_method",id="ba") @SpecAssertion(section="disposer_method_resolution",id="aa") @SpecAssertion(section="producer_or_disposer_methods_invocation",id="b")
        public void testBindingTypesAppliedToDisposalMethodParameters()
                                                               throws Exception
        Throws:
        Exception
      • testDisposalMethodOnNonBean

        @SpecAssertion(section="disposer_method",id="aa") @SpecAssertion(section="disposer_method_disposed_parameter",id="ba")
        public void testDisposalMethodOnNonBean()
                                         throws Exception
        Throws:
        Exception
      • testDisposalMethodParametersGetInjected

        @SpecAssertion(section="declaring_disposer_method",id="h") @SpecAssertion(section="injection_point_default_qualifier",id="a") @SpecAssertion(section="producer_or_disposer_methods_invocation",id="e")
        public void testDisposalMethodParametersGetInjected()
                                                     throws Exception
        In addition to the disposed parameter, a disposal method may declare additional parameters, which may also specify bindings. The container calls Manager.getInstanceToInject() to determine a value for each parameter of a disposal method and calls the disposal method with those parameter values
        Throws:
        Exception
      • testDisposalMethodForMultipleProducerMethods

        @SpecAssertion(section="disposer_method_disposed_parameter",
                       id="da")
        public void testDisposalMethodForMultipleProducerMethods()
                                                          throws Exception
        Throws:
        Exception
      • testDisposalMethodCalledForProducerField

        @SpecAssertion(section="disposer_method_resolution",id="ab") @SpecAssertion(section="producer_field_lifecycle",id="o")
        public void testDisposalMethodCalledForProducerField()
                                                      throws Exception
        Tests that a disposal method can be bound to a product of a producer field. CDI-145
        Throws:
        Exception