org.jboss.cdi.tck.tests.event.fires
Class FireEventTest

java.lang.Object
  extended by org.jboss.arquillian.testng.Arquillian
      extended by org.jboss.cdi.tck.AbstractTest
          extended by org.jboss.cdi.tck.tests.event.fires.FireEventTest
All Implemented Interfaces:
org.testng.IHookable, org.testng.ITestNGListener

@SpecVersion(spec="cdi",
             version="20091101")
public class FireEventTest
extends AbstractTest

Tests 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
 
Fields inherited from class org.jboss.arquillian.testng.Arquillian
ARQUILLIAN_DATA_PROVIDER
 
Constructor Summary
FireEventTest()
           
 
Method Summary
static org.jboss.shrinkwrap.api.spec.WebArchive createTestArchive()
           
 void testBeanManagerFireEvent()
           
 void testDuplicateBindingsToFireEventFails()
           
<T> void
testEventFireThrowsExceptionIfEventObjectContainsTypeVariable()
           
 void testEventProvidesMethodForFiringEventsWithCombinationOfTypeAndBindings()
           
 void testEventSelectedFiresAndObserversNotified()
           
 void testFireContainerLifecycleEvent(ContainerLifecycleEvents containerLifecycleEvents)
           
 void testInjectedAnyEventCanFireEvent()
          This test verifies that the Event object capable of firing Item objects can be injected with the {@link
 void testInjectedEventAcceptsEventObject()
          This test verifies that the fire() method of the injected Event object accepts an event object and that the event object's type is the same as the the parameterized type on the event field.
 void testInjectedEventCanHaveBindings()
          This test verifies that the Event object representing an Item with the @Lifted binding type is properly injected and that this object can be used to fire an event.
 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.
 void testTypeVariableEventTypeFails()
           
 
Methods inherited from class org.jboss.cdi.tck.AbstractTest
activate, annotationSetMatches, annotationSetMatches, destroyContext, getBeans, getBeans, getCurrentConfiguration, getCurrentManager, getInstanceByName, getInstanceByType, getInstanceByType, getUniqueBean, getUniqueBean, isThrowablePresent, passivate, rawTypeSetMatches, setContextActive, setContextInactive, typeSetMatches
 
Methods inherited from class org.jboss.arquillian.testng.Arquillian
arquillianAfterClass, arquillianAfterSuite, arquillianAfterTest, arquillianArgumentProvider, arquillianBeforeClass, arquillianBeforeSuite, arquillianBeforeTest, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FireEventTest

public FireEventTest()
Method Detail

createTestArchive

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

testBeanManagerFireEvent

@SpecAssertions(value={@SpecAssertion(section="11.3.10",id="a"),@SpecAssertion(section="11.3.10",id="b")})
public void testBeanManagerFireEvent()

testTypeVariableEventTypeFails

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

testDuplicateBindingsToFireEventFails

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

testInjectedAnyEventCanFireEvent

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


testInjectedEventAcceptsEventObject

@SpecAssertions(value={@SpecAssertion(section="10.3",id="b"),@SpecAssertion(section="10.3.1",id="cb")})
public void testInjectedEventAcceptsEventObject()
                                         throws SecurityException,
                                                NoSuchFieldException,
                                                NoSuchMethodException
This test verifies that the fire() method of the injected Event object accepts an event object and that the event object's type is the same as the the parameterized type on the event field.

Throws:
SecurityException
NoSuchFieldException
NoSuchMethodException

testInjectedEventCanHaveBindings

@SpecAssertions(value={@SpecAssertion(section="10.3",id="c"),@SpecAssertion(section="10.3.1",id="cb")})
public void testInjectedEventCanHaveBindings()
This test verifies that the Event object representing an Item with the @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="10.3",
               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="10.3.1",
               id="ca")
public void testEventProvidesMethodForFiringEventsWithCombinationOfTypeAndBindings()

testEventSelectedFiresAndObserversNotified

@SpecAssertion(section="10.3.1",
               id="eda")
public void testEventSelectedFiresAndObserversNotified()

testEventFireThrowsExceptionIfEventObjectContainsTypeVariable

@SpecAssertions(value={@SpecAssertion(section="10.3.1",id="f"),@SpecAssertion(section="10.2",id="j")})
public <T> void testEventFireThrowsExceptionIfEventObjectContainsTypeVariable()

testFireContainerLifecycleEvent

@SpecAssertion(section="10.3.1",
               id="g")
public void testFireContainerLifecycleEvent(ContainerLifecycleEvents containerLifecycleEvents)


Copyright © 2008-2012 Seam Framework. All Rights Reserved.