Class FireEventTest
- java.lang.Object
-
- org.jboss.arquillian.testng.Arquillian
-
- org.jboss.cdi.tck.AbstractTest
-
- org.jboss.cdi.tck.tests.event.fires.FireEventTest
-
- All Implemented Interfaces:
org.testng.IHookable,org.testng.ITestNGListener
@SpecVersion(spec="cdi", version="2.0") public class FireEventTest extends AbstractTestTests that verify the event firing behavior of the Event interface.- Author:
- Dan Allen, Martin Kouba
-
-
Field Summary
-
Fields inherited from class org.jboss.cdi.tck.AbstractTest
beanManager
-
-
Constructor Summary
Constructors Constructor Description FireEventTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.jboss.shrinkwrap.api.spec.WebArchivecreateTestArchive()voidtestBeanManagerFireEvent()voidtestDuplicateBindingsToFireEventFails()<T> voidtestEventFireThrowsExceptionIfEventObjectTypeContainsUnresovableTypeVariable()voidtestEventProvidesMethodForFiringEventsWithCombinationOfTypeAndBindings()voidtestEventSelectedFiresAndObserversNotified()voidtestFireContainerLifecycleEvent(ContainerLifecycleEventDispatcher containerLifecycleEvents)voidtestInjectedAnyEventCanFireEvent()This test verifies that theEventobject capable of firingItemobjects can be injected with the {@linkvoidtestInjectedEventAcceptsEventObject()This test verifies that the fire() method of the injectedEventobject accepts an event object and that the event object's type is the same as the the parameterized type on the event field.voidtestInjectedEventCanHaveBindings()This test verifies that theEventobject representing anItemwith the {@link @Lifted} binding type is properly injected and that this object can be used to fire an event.voidtestInjectedEventCanSpecifyBindingsDynamically()This test verifies that binding types can be specified dynamically when firing an event usingEvent#fire()by first using theEvent#select()method to retrieve an Event object with associated binding types.voidtestTypeVariableEventTypeFails()-
Methods inherited from class org.jboss.cdi.tck.AbstractTest
activate, annotationSetMatches, annotationSetMatches, destroyContext, getBeans, getBeans, getContextualReference, getContextualReference, getContextualReference, getCurrentBeanContainer, getCurrentConfiguration, getCurrentManager, getUniqueBean, getUniqueBean, isThrowablePresent, newDependentInstance, passivate, rawTypeSetMatches, setContextActive, setContextInactive, typeSetMatches
-
-
-
-
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 theEventobject capable of firingItemobjects can be injected with the {@link
-
testInjectedEventAcceptsEventObject
@SpecAssertion(section="firing_events_synchronously",id="b") @SpecAssertion(section="event",id="cb") public void testInjectedEventAcceptsEventObject() throws SecurityException, NoSuchFieldException, NoSuchMethodExceptionThis test verifies that the fire() method of the injectedEventobject accepts an event object and that the event object's type is the same as the the parameterized type on the event field.
-
testInjectedEventCanHaveBindings
@SpecAssertion(section="firing_events",id="c") @SpecAssertion(section="event",id="cb") public void testInjectedEventCanHaveBindings()
This test verifies that theEventobject representing anItemwith 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 usingEvent#fire()by first using theEvent#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)
-
-