org.jboss.webbeans.tck.unit.event
Class EventTest

java.lang.Object
  extended by org.jboss.webbeans.tck.AbstractTest
      extended by org.jboss.webbeans.tck.unit.event.EventTest

public class EventTest
extends AbstractTest

Event bus tests

Author:
Nicklas Karlsson, David Allen Spec version: PRD2

Nested Class Summary
static class EventTest.AListObserver
           
static class EventTest.AnEventType
           
static class EventTest.AnObserver
           
static class EventTest.AnObserverWithException
           
static class EventTest.AnotherListObserver
           
static class EventTest.ATemplatedEventType<T>
           
 
Nested classes/interfaces inherited from class org.jboss.webbeans.tck.AbstractTest
AbstractTest.RunInDependentContext
 
Field Summary
 
Fields inherited from class org.jboss.webbeans.tck.AbstractTest
BUILT_IN_BEANS, manager, visited
 
Constructor Summary
EventTest()
           
 
Method Summary
protected  java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> getEnabledDeploymentTypes()
          This method should be overridden by test classes which need to enable additional deployment types beyond the normal ones.
 void testAfterTransactionCompletionObserver()
           
 void testAfterTransactionFailureObserver()
           
 void testAfterTransactionSuccessObserver()
           
 void testBeforeTransactionCompletionObserver()
           
 void testConditionalObserver()
          Tests that a conditional observer is not notified of events until after it is created by some other separate action.
 void testConsumerNotifiedWhenEventTypeAndAllBindingsMatch()
           
 void testDuplicateBindingsToFireFails()
           
 void testDuplicateBindingsToObservesFails()
           
 void testDuplicateBindingTypesWhenResolvingFails()
           
 void testEventObjectContainsTypeVariablesWhenResolvingFails()
           
 void testEventObjectContainsWildcardsWhenResolvingFails()
           
 void testEventTypeIncludesAllSuperclassesAndInterfacesOfEventObject()
           
 void testFireMethodCallsManagerFireWithAllBindingAnnotationInstances()
           
 void testFireMethodCallsManagerFireWithBindingAnnotationsExceptObservable()
           
 void testFireMethodCallsManagerFireWithEventObject()
           
 void testFiresAnnotationOnEventTypes()
           
 void testFiresAnnotationOnInjectionPointWithoutTypeParameterFails()
           
 void testFiresAnnotationOnInjectionPointWithTypeVariabledTypeParameterFails()
           
 void testFiresAnnotationOnInjectionPointWithWildcardedTypeParameterFails()
           
 void testFiresAnnotationOnNonEventTypeInjectionPointFails()
           
 void testImplicitEventBeanHasDependentScope()
           
 void testImplicitEventBeanHasStandardDeploymentType()
           
 void testImplicitEventBeanMatchesAPITypeOfInectionPoint()
           
 void testImplicitEventBeanMatchesBindingAnnotationsOfInjectionPoint()
           
 void testManagerAddObserver()
           
 void testManagerFireEvent()
           
 void testManagerFireEventWithEventTypeParametersFails()
          If the type of the event object passed to fireEvent() contains type variables or wildcards, an IllegalArgumentException is thrown
 void testManagerFireEventWithEventTypeWildcardsFails()
          If the type of the event object passed to fireEvent() contains type variables or wildcards, an IllegalArgumentException is thrown
 void testManagerFireEventWithNonBindingAnnotationsFails()
           
 void testManagerRemoveObserver()
           
 void testMultipleInstancesOfSameBindingTypeWhenAddingObserverFails()
           
 void testMultipleInstancesOfSameBindingTypeWhenRemovingObserverFails()
           
 void testMultipleObserverMethodsOK()
           
 void testNonBindingTypeAnnotationWhenResolvingFails()
           
 void testNonBindingTypePassedToAddObserverFails()
           
 void testNonBindingTypePassedToFireFails()
           
 void testNonBindingTypePassedToObservesFails()
           
 void testNonBindingTypePassedToRemoveObserverFails()
           
 void testNonStaticObserverMethodNotInherited()
           
 void testNonTransactionalObserverThrownCheckedExceptionIsWrappedAndRethrown()
           
 void testNonTransactionalObserverThrownNonCheckedExceptionIsRethrown()
           
 void testObserveMethodCallsManagerAddObserverWithAllBindingAnnotationInstance()
           
 void testObserveMethodCallsManagerAddObserverWithAllBindingAnnotationsExceptObservable()
           
 void testObserveMethodCallsManagerAddObserverWithObserverObject()
           
 void testObserverCalledOnMostSpecializedInstance()
           
 void testObserverMethodAnnotatedInitializerFails()
           
 void testObserverMethodAnnotatedProducesFails()
           
 void testObserverMethodCannotObserveParameterizedEvents()
           
 void testObserverMethodMayHaveMultipleBindingTypes()
           
 void testObserverMethodMustHaveOnlyOneEventParameter()
           
 void testObserverMethodReceivesInjectionsOnNonObservesParameters()
           
 void testObserverMethodRegistration()
           
 void testObserverMethodWithDisposesParamFails()
           
 void testObserverMethodWithoutBindingTypesObservesEventsWithoutBindingTypes()
           
 void testObserverThrowsExceptionAbortsNotifications()
           
 void testResolvingChecksBindingTypeMembers()
           
 void testResolvingChecksBindingTypes()
           
 void testResolvingChecksEventType()
           
 void testResolvingChecksTypeParameters()
           
 void testTransactionalObserverCanOnlyObserveSinglePhase()
           
 void testTransactionalObserverNotifiedImmediatelyWhenNoTransactionInProgress()
           
 void testXMLDefinedObserverMethodIgnoresBindingAnnotations()
           
 void testXMLDefinedObserverNotFindingImplementationMethodFails()
           
 
Methods inherited from class org.jboss.webbeans.tck.AbstractTest
activateDependentContext, after, before, createEnterpriseBean, createProducerFieldBean, createProducerMethodBean, createSimpleBean, deactivateDependentContext, deployBeans, deserialize, getStandardDeploymentTypes, mockCreationalContext, serialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventTest

public EventTest()
Method Detail

getEnabledDeploymentTypes

protected java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> getEnabledDeploymentTypes()
Description copied from class: AbstractTest
This method should be overridden by test classes which need to enable additional deployment types beyond the normal ones.

Overrides:
getEnabledDeploymentTypes in class AbstractTest
Returns:
the list of enabled deployment types

testEventTypeIncludesAllSuperclassesAndInterfacesOfEventObject

@SpecAssertion(section="7.1")
public void testEventTypeIncludesAllSuperclassesAndInterfacesOfEventObject()

testManagerFireEvent

@SpecAssertion(section="7.2")
public void testManagerFireEvent()

testManagerFireEventWithEventTypeParametersFails

@SpecAssertion(section={"7.1","7.2"})
public void testManagerFireEventWithEventTypeParametersFails()
If the type of the event object passed to fireEvent() contains type variables or wildcards, an IllegalArgumentException is thrown


testManagerFireEventWithEventTypeWildcardsFails

@SpecAssertion(section={"7.1","7.2"})
public void testManagerFireEventWithEventTypeWildcardsFails()
If the type of the event object passed to fireEvent() contains type variables or wildcards, an IllegalArgumentException is thrown


testManagerFireEventWithNonBindingAnnotationsFails

@SpecAssertion(section={"7.1","7.2"})
public void testManagerFireEventWithNonBindingAnnotationsFails()

testManagerAddObserver

@SpecAssertion(section="7.3")
public void testManagerAddObserver()

testManagerRemoveObserver

@SpecAssertion(section="7.3")
public void testManagerRemoveObserver()

testMultipleInstancesOfSameBindingTypeWhenAddingObserverFails

@SpecAssertion(section="7.3")
public void testMultipleInstancesOfSameBindingTypeWhenAddingObserverFails()

testNonBindingTypePassedToAddObserverFails

@SpecAssertion(section="7.3")
public void testNonBindingTypePassedToAddObserverFails()

testMultipleInstancesOfSameBindingTypeWhenRemovingObserverFails

@SpecAssertion(section="7.3")
public void testMultipleInstancesOfSameBindingTypeWhenRemovingObserverFails()

testNonBindingTypePassedToRemoveObserverFails

@SpecAssertion(section="7.3")
public void testNonBindingTypePassedToRemoveObserverFails()

testConsumerNotifiedWhenEventTypeAndAllBindingsMatch

@SpecAssertion(section={"7.1","7.4"})
public void testConsumerNotifiedWhenEventTypeAndAllBindingsMatch()

testObserverThrowsExceptionAbortsNotifications

@SpecAssertion(section="7.4")
public void testObserverThrowsExceptionAbortsNotifications()

testMultipleObserverMethodsOK

@SpecAssertion(section="7.5")
public void testMultipleObserverMethodsOK()

testObserverMethodMustHaveOnlyOneEventParameter

@SpecAssertion(section={"7.5.1","7.5.2"})
public void testObserverMethodMustHaveOnlyOneEventParameter()

testObserverMethodCannotObserveParameterizedEvents

@SpecAssertion(section="7.5.1")
public void testObserverMethodCannotObserveParameterizedEvents()

testObserverMethodWithoutBindingTypesObservesEventsWithoutBindingTypes

@SpecAssertion(section="7.5.1")
public void testObserverMethodWithoutBindingTypesObservesEventsWithoutBindingTypes()

testObserverMethodAnnotatedProducesFails

@SpecAssertion(section="7.5.2")
public void testObserverMethodAnnotatedProducesFails()

testObserverMethodAnnotatedInitializerFails

@SpecAssertion(section="7.5.2")
public void testObserverMethodAnnotatedInitializerFails()

testObserverMethodWithDisposesParamFails

@SpecAssertion(section="7.5.2")
public void testObserverMethodWithDisposesParamFails()

testObserverMethodMayHaveMultipleBindingTypes

@SpecAssertion(section="7.5.2")
public void testObserverMethodMayHaveMultipleBindingTypes()

testXMLDefinedObserverMethodIgnoresBindingAnnotations

@SpecAssertion(section="7.5.3")
public void testXMLDefinedObserverMethodIgnoresBindingAnnotations()

testXMLDefinedObserverNotFindingImplementationMethodFails

@SpecAssertion(section="7.5.3")
public void testXMLDefinedObserverNotFindingImplementationMethodFails()

testObserverMethodReceivesInjectionsOnNonObservesParameters

@SpecAssertion(section="7.5.4")
public void testObserverMethodReceivesInjectionsOnNonObservesParameters()

testConditionalObserver

@SpecAssertion(section="7.5.5")
public void testConditionalObserver()
Tests that a conditional observer is not notified of events until after it is created by some other separate action.


testTransactionalObserverCanOnlyObserveSinglePhase

@SpecAssertion(section="7.1")
public void testTransactionalObserverCanOnlyObserveSinglePhase()

testTransactionalObserverNotifiedImmediatelyWhenNoTransactionInProgress

@SpecAssertion(section="7.5.6")
public void testTransactionalObserverNotifiedImmediatelyWhenNoTransactionInProgress()

testAfterTransactionCompletionObserver

@SpecAssertion(section="7.5.6")
public void testAfterTransactionCompletionObserver()

testAfterTransactionSuccessObserver

@SpecAssertion(section="7.5.6")
public void testAfterTransactionSuccessObserver()

testAfterTransactionFailureObserver

@SpecAssertion(section="7.5.6")
public void testAfterTransactionFailureObserver()

testBeforeTransactionCompletionObserver

@SpecAssertion(section="7.5.6")
public void testBeforeTransactionCompletionObserver()

testObserverMethodRegistration

@SpecAssertion(section="7.5.8")
public void testObserverMethodRegistration()

testNonTransactionalObserverThrownNonCheckedExceptionIsRethrown

@SpecAssertion(section="7.5.8")
public void testNonTransactionalObserverThrownNonCheckedExceptionIsRethrown()

testNonTransactionalObserverThrownCheckedExceptionIsWrappedAndRethrown

@SpecAssertion(section="7.5.8")
public void testNonTransactionalObserverThrownCheckedExceptionIsWrappedAndRethrown()

testDuplicateBindingsToFireFails

@SpecAssertion(section="7.6")
public void testDuplicateBindingsToFireFails()

testDuplicateBindingsToObservesFails

@SpecAssertion(section="7.6")
public void testDuplicateBindingsToObservesFails()

testNonBindingTypePassedToFireFails

@SpecAssertion(section="7.6")
public void testNonBindingTypePassedToFireFails()

testNonBindingTypePassedToObservesFails

@SpecAssertion(section="7.6")
public void testNonBindingTypePassedToObservesFails()

testFiresAnnotationOnEventTypes

@SpecAssertion(section="7.6")
public void testFiresAnnotationOnEventTypes()

testFiresAnnotationOnNonEventTypeInjectionPointFails

@SpecAssertion(section="7.6")
public void testFiresAnnotationOnNonEventTypeInjectionPointFails()

testFiresAnnotationOnInjectionPointWithoutTypeParameterFails

@SpecAssertion(section="7.6")
public void testFiresAnnotationOnInjectionPointWithoutTypeParameterFails()

testFiresAnnotationOnInjectionPointWithWildcardedTypeParameterFails

@SpecAssertion(section="7.6")
public void testFiresAnnotationOnInjectionPointWithWildcardedTypeParameterFails()

testFiresAnnotationOnInjectionPointWithTypeVariabledTypeParameterFails

@SpecAssertion(section="7.6")
public void testFiresAnnotationOnInjectionPointWithTypeVariabledTypeParameterFails()

testImplicitEventBeanMatchesAPITypeOfInectionPoint

@SpecAssertion(section="7.6")
public void testImplicitEventBeanMatchesAPITypeOfInectionPoint()

testImplicitEventBeanMatchesBindingAnnotationsOfInjectionPoint

@SpecAssertion(section="7.6")
public void testImplicitEventBeanMatchesBindingAnnotationsOfInjectionPoint()

testImplicitEventBeanHasStandardDeploymentType

@SpecAssertion(section="7.6")
public void testImplicitEventBeanHasStandardDeploymentType()

testImplicitEventBeanHasDependentScope

@SpecAssertion(section="7.6")
public void testImplicitEventBeanHasDependentScope()

testFireMethodCallsManagerFireWithEventObject

@SpecAssertion(section="7.6")
public void testFireMethodCallsManagerFireWithEventObject()

testFireMethodCallsManagerFireWithBindingAnnotationsExceptObservable

@SpecAssertion(section="7.6")
public void testFireMethodCallsManagerFireWithBindingAnnotationsExceptObservable()

testFireMethodCallsManagerFireWithAllBindingAnnotationInstances

@SpecAssertion(section="7.6")
public void testFireMethodCallsManagerFireWithAllBindingAnnotationInstances()

testObserveMethodCallsManagerAddObserverWithObserverObject

@SpecAssertion(section="7.6")
public void testObserveMethodCallsManagerAddObserverWithObserverObject()

testObserveMethodCallsManagerAddObserverWithAllBindingAnnotationsExceptObservable

@SpecAssertion(section="7.6")
public void testObserveMethodCallsManagerAddObserverWithAllBindingAnnotationsExceptObservable()

testObserveMethodCallsManagerAddObserverWithAllBindingAnnotationInstance

@SpecAssertion(section="7.6")
public void testObserveMethodCallsManagerAddObserverWithAllBindingAnnotationInstance()

testEventObjectContainsTypeVariablesWhenResolvingFails

@SpecAssertion(section="7.7")
public void testEventObjectContainsTypeVariablesWhenResolvingFails()

testEventObjectContainsWildcardsWhenResolvingFails

@SpecAssertion(section="7.7")
public void testEventObjectContainsWildcardsWhenResolvingFails()

testDuplicateBindingTypesWhenResolvingFails

@SpecAssertion(section="7.7")
public void testDuplicateBindingTypesWhenResolvingFails()

testNonBindingTypeAnnotationWhenResolvingFails

@SpecAssertion(section="7.7")
public void testNonBindingTypeAnnotationWhenResolvingFails()

testResolvingChecksEventType

@SpecAssertion(section="7.7")
public void testResolvingChecksEventType()

testResolvingChecksTypeParameters

@SpecAssertion(section="7.7")
public void testResolvingChecksTypeParameters()

testResolvingChecksBindingTypes

@SpecAssertion(section="7.7")
public void testResolvingChecksBindingTypes()

testResolvingChecksBindingTypeMembers

@SpecAssertion(section="7.7")
public void testResolvingChecksBindingTypeMembers()

testNonStaticObserverMethodNotInherited

@SpecAssertion(section="4.")
public void testNonStaticObserverMethodNotInherited()

testObserverCalledOnMostSpecializedInstance

@SpecAssertion(section="7.5.8")
public void testObserverCalledOnMostSpecializedInstance()


Copyright © 2008-2009. All Rights Reserved.