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

java.lang.Object
  extended by org.jboss.testharness.AbstractTest
      extended by org.jboss.jsr299.tck.AbstractJSR299Test
          extended by org.jboss.jsr299.tck.tests.event.fires.FireEventTest
All Implemented Interfaces:
org.testng.IHookable, org.testng.ITestNGListener

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

Tests that verify the event firing behavior of the Event interface.

Author:
Dan Allen

Constructor Summary
FireEventTest()
           
 
Method Summary
 void testBeanManagerFireEvent()
           
 void testBeanManagerInterfaceForFireEventMethod()
           
 void testDuplicateBindingsToFireEventFails()
           
<T> void
testEventFireThrowsExceptionIfEventObjectContainsTypeVariable()
           
 void testEventProvidesMethodForFiringEventsWithCombinationOfTypeAndBindings()
           
 void testEventSelectedFiresAndObserversNotified()
           
 void testInjectedAnyEventCanFireEvent()
          This test verifies that the Event object capable of firing Item objects can be injected with the @Any binding type and that the injected object can be used to fire an event.
 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.jsr299.tck.AbstractJSR299Test
annotationSetMatches, deserialize, destroyContext, getBeans, getBeans, getCurrentConfiguration, getCurrentManager, getInstanceByName, getInstanceByType, getInstanceByType, getUniqueBean, getUniqueBean, handleDeploymentFailure, rawTypeSetMatches, serialize, setContextActive, setContextInactive, typeSetMatches
 
Methods inherited from class org.jboss.testharness.AbstractTest
afterClass, afterMethod, afterSuite, beforeClass, beforeMethod, beforeSuite, getContextPath, isInContainer, isThrowablePresent, postCreate, run, setInContainer
 
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

testBeanManagerInterfaceForFireEventMethod

@SpecAssertions(value={@SpecAssertion(section="11.3.9",id="a"),@SpecAssertion(section="11.3.9",id="b")})
public void testBeanManagerInterfaceForFireEventMethod()
                                                throws Exception
Throws:
Exception

testBeanManagerFireEvent

@SpecAssertion(section="11.3.9",
               id="a")
public void testBeanManagerFireEvent()

testTypeVariableEventTypeFails

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

testDuplicateBindingsToFireEventFails

@SpecAssertion(section="11.3.9",
               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 @Any binding type and that the injected object can be used to fire an event. The functionality is verified by checking that the corresponding observer gets invoked.


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

@SpecAssertion(section="10.3.1",
               id="f")
public <T> void testEventFireThrowsExceptionIfEventObjectContainsTypeVariable()


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