Class FireEventTest

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

    @SpecVersion(spec="cdi",
                 version="2.0")
    public class FireEventTest
    extends AbstractTest
    Tests that verify the event firing behavior of the Event interface.
    Author:
    Dan Allen, Martin Kouba
    • Constructor Detail

      • FireEventTest

        public FireEventTest()
    • Method Detail

      • createTestArchive

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

        @SpecAssertion(section="bm_fire_event",id="a") @SpecAssertion(section="bm_fire_event",id="b")
        public void testBeanManagerFireEvent()
      • testTypeVariableEventTypeFails

        @SpecAssertion(section="bm_fire_event",
                       id="c")
        public void testTypeVariableEventTypeFails()
                                            throws Exception
        Throws:
        Exception
      • testDuplicateBindingsToFireEventFails

        @SpecAssertion(section="bm_fire_event",
                       id="d")
        public void testDuplicateBindingsToFireEventFails()
                                                   throws Exception
        Throws:
        Exception
      • testInjectedAnyEventCanFireEvent

        @SpecAssertion(section="firing_events",
                       id="a")
        public void testInjectedAnyEventCanFireEvent()
        This test verifies that the Event object capable of firing Item objects can be injected with the {@link
      • testInjectedEventCanHaveBindings

        @SpecAssertion(section="firing_events",id="c") @SpecAssertion(section="event",id="cb")
        public void testInjectedEventCanHaveBindings()
        This test verifies that the Event object representing an Item with the {@link @Lifted} binding type is properly injected and that this object can be used to fire an event. The functionality is verified by checking that the cooresponding observer gets invoked.
      • testInjectedEventCanSpecifyBindingsDynamically

        @SpecAssertion(section="firing_events",
                       id="d")
        public void testInjectedEventCanSpecifyBindingsDynamically()
        This test verifies that binding types can be specified dynamically when firing an event using Event#fire() by first using the Event#select() method to retrieve an Event object with associated binding types.
      • testEventProvidesMethodForFiringEventsWithCombinationOfTypeAndBindings

        @SpecAssertion(section="event",
                       id="ca")
        public void testEventProvidesMethodForFiringEventsWithCombinationOfTypeAndBindings()
      • testEventSelectedFiresAndObserversNotified

        @SpecAssertion(section="event",
                       id="eda")
        public void testEventSelectedFiresAndObserversNotified()
      • testEventFireThrowsExceptionIfEventObjectTypeContainsUnresovableTypeVariable

        @SpecAssertion(section="event",id="f") @SpecAssertion(section="observer_resolution",id="j")
        public <T> void testEventFireThrowsExceptionIfEventObjectTypeContainsUnresovableTypeVariable()
      • testFireContainerLifecycleEvent

        @SpecAssertion(section="event",
                       id="g")
        public void testFireContainerLifecycleEvent​(ContainerLifecycleEventDispatcher containerLifecycleEvents)