org.jboss.cdi.tck
Class AbstractTest

java.lang.Object
  extended by org.jboss.arquillian.testng.Arquillian
      extended by org.jboss.cdi.tck.AbstractTest
All Implemented Interfaces:
org.testng.IHookable, org.testng.ITestNGListener
Direct Known Subclasses:
AbstractConversationTest, AbstractObserverNotificationTest, AddDefinitionErrorTest, AddDefinitionErrorTest, AddDefinitionErrorTest, AddDefinitionErrorTest, AddDeploymentProblemTest, AddingNormalScopeTest, AddingPassivatingScopeTest, AfterBeanDiscoveryFailureTest, AfterBeanDiscoveryObserverExecutionFailureTest, AfterBeanDiscoveryTest, AfterDeploymentValidationObserverExecutionFailureTest, AlternativeAvailabilityTest, AlternativeInLibraryWithExtensionTest, AlternativeMetadataTest, AlternativeMetaDataTest, AmbiguousDependencyTest, AmbiguousInjectableReferenceTest, AnyInjectionTest, ApplicationContextSharedTest, ApplicationContextTest, ApplicationScopeEventMultiWarTest, ApplicationScopeEventTest, AroundInvokeInterceptorTest, ArrayTest, AssignabilityOfRawAndParameterizedTypesTest, BeanByTypeTest, BeanDefinitionTest, BeanManagerServletContextEarTest, BeanManagerTest, BeanRegistrationByExtensionInNonBeanArchiveTest, BeforeBeanDiscoveryThrowsExceptionTest, BindingAnnotationWithMemberTest, BindingAnnotationWithMemberTest, BuiltInBeansTest, BuiltinInstanceTest, BuiltinMetadataBeanTest, CdiProviderIncontainerTest, CircularDependencyTest, ClassIsNotAlternativeTest, ClassIsNotAlternativeTest, ClientProxyTest, ClientProxyTest, ConditionalObserverTest, ConstructorHasDisposesParameterTest, ConstructorHasObservesParameterTest, ContainerEventTest, ContainerEventTest, ContainerEventTest, ContextDestroysBeansTest, ContextTest, CreateBeanAttributesTest, CreationalContextForNonContextualTest, CustomBeanImplementationTest, CustomDecoratorMatchingBeanWithFinalClassTest, CustomDecoratorTest, CustomInterceptorInvocationTest, CustomInterceptorRegistrationTest, CustomInterceptorTest, DecoratorAndInterceptorTest, DecoratorAnnotatedStatelessSessionBeanTest, DecoratorDefinitionTest, DecoratorInvocationTest, DecoratorInvocationTest, DecoratorInvocationTest, DecoratorListedTwiceInBeansXmlTest, DecoratorNotInjectedTest, DecoratorResolutionTest, DecoratorWithInvalidAbstractMethodTest, DecoratorWithNonPassivatingInjectedFieldTest, DecoratorWithNonPassivationCapableDependenciesTest, DecoratorWithObserverMethodTest, DefaultNamedTest, DefinitionTest, DelegateFieldInjectionPointTest, DelegateInjectionPointTest, DelegateInjectionPointTest, DelegateInjectionPointTest, DependentContextEjbTest, DependentContextTest, DependentIsConditionalObserverTest, DependentWithPublicFieldTest, DeploymentFailureTest, DeploymentTest, DestroyedInstanceReturnedByGetTest, DestroyForSameCreationalContext2Test, DestroyForSameCreationalContextTest, DifferentTypeParametersTest, DirectlyExtendsNothingTest, DirectlyExtendsSimpleBeanTest, DisabledProducerFieldInjectionNotAvailableTest, DisabledProducerMethodInjectionNotAvailableTest, DisabledSessionBeanInjectionNotAvailableTest, DisposalMethodDefinitionTest, DisposalMethodInjectionPointTest, DisposalMethodOnSessionBeanTest, DisposerMethodOnDecoratorTest, DisposerMethodOnInterceptorTest, DuplicateBindingTypesWhenResolvingTest, DuplicateDecoratorTest, DuplicateInterceptorTest, DuplicateNamePrefixResolutionTest, DuplicateNameResolutionTest, DynamicLookupTest, EJBDecoratorInvocationTest, EjbInitializerMethodTest, EjbInjectionTest, EJBObserverMethodNotBusinessMethodTest, EJBRequestContextTest, EnabledDecoratorNotADecoratorTest, EnabledManagedBeanInjectionAvailabilityTest, EnabledProducerFieldInjectionAvailabilityTest, EnabledProducerMethodInjectionAvailabilityTest, EnabledSessionBeanInjectionAvailabilityTest, EnterpriseBeanDefinitionTest, EnterpriseBeanLifecycleTest, EnterpriseBeanNotDiscoveredAsManagedBeanTest, EnterpriseBeanRemoveMethodTest, EnterpriseBeanSpecializationIntegrationTest, EnterpriseBeanSpecializationTest, EnterpriseBeanViaXmlTest, EnterpriseBeanWithIllegalDependencyTest, EnterpriseBeanWithIllegalDependencyTest, EnterpriseBeanWithNonPassivatingDecoratorTest, EnterpriseBeanWithNonPassivatingInjectedFieldInDecoratorTest, EnterpriseBeanWithNonPassivatingInjectedFieldInInterceptorTest, EnterpriseEventInheritenceTest, EnterpriseProducerFieldDefinitionTest, EnterpriseProducerMethodDefinitionTest, EnterpriseQualifierDefinitionTest, EnterpriseResolutionByTypeTest, EnterpriseScopeDefinitionTest, EnterpriseStereotypeDefinitionTest, EnumInjectionTest, EnumValidationTest, EnvInjectionTest, EventBindingTypesTest, EventInjectionWithoutTypeTest, EventTest, EventTypesTest, ExceptionTest, ExtensionLifecycleTest, ExtensionsTest, FinalBeanClassTest, FinalBeanMethodTest, FinalClassClassLevelInterceptorTest, FinalClassMethodLevelInterceptorTest, FinalClassTest, FinalClassWithInheritedClassLevelInterceptorTest, FinalClassWithInheritedStereotypeInterceptorTest, FinalMethodClassLevelInterceptorTest, FinalMethodMethodLevelInterceptorTest, FinalMethodWithInheritedClassLevelInterceptorTest, FinalMethodWithInheritedStereotypeInterceptorTest, FireEventTest, GenericInitializerMethodTest, GenericManagedBeanTest, GenericStatelessSessionBeanTest, GetFromContextualTest, GetOnInactiveContextTest, GetWithNoCreationalContextTest, CheckedExceptionWrappedTest, ChecksEventTypeWhenResolvingTest, CheckTypeParametersWhenResolvingObserversTest, ImplementsInterfaceAndExtendsNothingTest, ImplicitEventTest, IncompatibleStereotypesTest, InconsistentSpecializationTest, IndirectOverrideTest, InitializerMethodAnnotatedProducesTest, InitializerMethodInheritanceTest, InitializerMethodTest, InitializerUnallowedDefinitionTest, InjectableReferenceTest, InjectAnnotatedProducerFieldTest, InjectedFieldAnnotatedWithProducesTest, InjectionIntoNonContextualComponentTest, InjectionIntoWebServiceEndPointTest, InjectionOfResourceTest, InjectionPointOverridingTest, InjectionPointTest, InjectionPointTest, InjectionTargetDefinitionErrorTest, InjectionTest, IntegrationWithUnifiedELTest, InterceptorAnnotatedStatelessSessionBeanTest, InterceptorBindingInheritanceTest, InterceptorBindingOverridingTest, InterceptorBindingTypeWithMemberTest, InterceptorCalledBeforeDecoratorTest, InterceptorCanNotBeDecoratorTest, InterceptorDefinitionTest, InterceptorExtensionTest, InterceptorForLifecycleTargetMethodTest, InterceptorInvocationTest, InterceptorNotListedInBeansXmlNotEnabledTest, InterceptorNotResolvedTest, InterceptorOrderTest, InterceptorWithNonPassivationCapableDependenciesTest, InterceptorWithObserverMethodTest, InterModuleELResolutionTest, InterModuleLookupTest, InvalidQualifierTest, InvalidScopeTest, InvalidStereotypeInterceptorBindingAnnotationsTest, InvalidStereotypeTest, InvalidTransitiveInterceptorBindingAnnotationsTest, InvalidTypesTest, InvocationContextTest, InvocationOrderTest, InvocationOrderTest, JarToJarAlphaVisibilityTest, JarToJarReverseAlphaVisibilityTest, LibraryInEarTest, LibraryInWarTest, LibraryMissingBeansXmlTest, LifecycleCallbackInterceptorExceptionTest, LifecycleCallbackInterceptorTest, LongRunningConversationLifecycleEventTest, ManagedBeanWithNonPassivatingDecoratorTest, ManagedBeanWithNonSerializableInterceptorClassTest, ManagerTest, ManagerTest, ManagerTestEar, MessageDrivenBeanContextTest, MessageDrivenBeanInterceptorInvocationTest, MessageListenerContextTest, MethodLevelInterceptorTest, MultiModuleProcessingTest, MultipleDelegateInjectionPointsTest, MultipleDisposeParametersDefinitionTest, MultipleDisposerMethodsForProducerMethodTest, MultipleInterceptorBindingsTest, MultiWebModuleWithExtensionTest, NameDefinitionTest, NamedNonFieldInjectionPointTest, NamedNonFieldInjectionPointTest, NamedNonFieldInjectionPointTest, NewEnterpriseBeanICTest, NewEnterpriseBeanTest, NewSimpleBeanTest, NoAnnotationWithSpecifiedNameTest, NoClassWithSpecifiedNameTest, NoDelegateInjectionPointsTest, NonBindingTypePassedToFireTest, NonBindingTypesWhenResolvingTest, NonDecoratorWithDecoratesTest, NonEmptyNamedTest, NonExistantClassInBeansXmlTest, NonExistantDecoratorClassInBeansXmlTest, NonInterceptorClassInBeansXmlTest, NonPassivatingInjectionIntoPassivatingBeanTest, NonPassivationCapableEjbWithPassivatingScopeTest, NonPassivationCapableProducerFieldTest, NonPassivationCapableProducerMethodTest, NonPassivationCapableSessionBeanTest, NonPassivationManagedBeanHasPassivatingScopeTest, NonPrivateNonStaticMethodTest, NonStaticFieldOfSessionBeanTest, NormalContextTest, NormalScopedBeanWithInjectionPoint, NotAllDecoratedTypesImplementedTest, NullableBeanTest, ObserverExceptionAbortsProcessingTest, ObserverExceptionRethrownTest, ObserverMethodAnnotatedDisposesTest, ObserverMethodAnnotatedInitialzerTest, ObserverMethodAnnotatedProducesTest, ObserverMethodOnIncorrectBeanTest, ObserverMethodParameterInjectionValidationTest, ObserverMethodWithParametertizedTypeTest, ObserverMethodWithTwoEventParametersTest, ObserverParameterUnallowedDefinitionTest, ObserverTest, ParameterAnnotatedDisposesTest, ParameterAnnotatedDisposesTest, ParameterAnnotatedObservesTest, ParameterAnnotatedObservesTest, ParameterizedReturnTypeWithTypeVariableTest, ParameterizedReturnTypeWithWildcardTest, ParameterizedTypeWithWildcardTest, PassivatingContextTest, PassivatingManagedBeanWithNonPassivatingInjcetedFieldTest, PassivationCapabilityErrorCausedByExtensionDetectedTest, PassivationCapableBeanWithNonPassivatingInterceptorTest, PassivationCapableDependencyErrorCausedByExtensionDetectedTest, PassivationIdTest, PersistenceContextInjectionTest, PrimitiveInjectionPointTest, PrivateConstructorTest, PrivateFinalMethodTest, ProblematicExtensionTest, ProcessAnnotatedTypeEventThrowsExceptionTest, ProcessAnnotatedTypeTest, ProcessBeanAttributesFiredForSyntheticBeanTest, ProcessBeanTest, ProcessInjectionPointFiredTest, ProcessInjectionTargetEventThrowsExceptionTest, ProcessObserverMethodErrorTest, ProcessObserverMethodEventTest, ProcessObserverMethodExceptionTest, ProcessSessionBeanTest, ProcessSyntheticAnnotatedTypeTest, ProducerFieldDefinitionTest, ProducerFieldLifecycleTest, ProducerFieldOnDecoratorTest, ProducerFieldOnInterceptorTest, ProducerFieldWithTypeVariableTest, ProducerMethodDefinitionTest, ProducerMethodLifecycleTest, ProducerMethodNotBusinessMethodTest, ProducerMethodOnDecoratorTest, ProducerMethodOnInterceptorTest, ProducerMethodSpecializationTest, ProducerMethodWithPrimitiveReturnTypePassivationTest, ProducerProcessingWithDefinitionErrorTest, ProducerProcessingWithExceptionTest, ProducerTest, ProducerWithPrimitiveFieldTypePassivationTest, ProducesUnallowedDefinitionTest, QualifierDefinitionTest, RequestContextTest, RequestContextTest, RequestScopedProducerFieldWithTypeVariableTest, RequestScopeEventTest, ResolutionByNameTest, ResolutionByNameTest, ResolutionByTypeTest, ResolveEnterpriseEventObserverTest, ResolveEventObserversTest, ResolvingChecksBindingTypeMembersTest, RestrictedManagedBeanTest, RestrictedProducerFieldTest, RestrictedProducerMethodTest, RestrictedSessionBeanTest, SameClassListedTwiceInBeansXmlTest, SameNameTest, SameTypeListedTwiceTest, ScopeDefinitionTest, SelectedAlternativeManagedBeanInjectionAvailabilityTest, SelectedAlternativeSessionBeanInjectionAvailabilityTest, SelectEventTest, ServletContainerBuiltinBeanTest, ServletConversationTest, SessionBeanAlternativeTest, SessionBeanInjectionOrderingTest, SessionBeanInjectionTest, SessionBeanInterceptorDefinitionTest, SessionBeanInterceptorOnNonContextualEjbReferenceTest, SessionBeanInterceptorOrderTest, SessionContextTest, SessionScopeEventTest, SetBeanAttributesTest, SimpleBeanDefinitionTest, SimpleBeanLifecycleTest, SimpleBeanSpecializationTest, SingleModuleProcessingTest, SingletonWithConversationScopeTest, SingletonWithRequestScopeTest, SingletonWithSessionScopeTest, SingleWebModuleWithExtensionTest, SpecializationTest, SpecializedBeanInjectionNotAvailableTest, SpecializedProducerMethodInjectionNotAvailableTest, SpecializesStaticMethodTest, SpecializingAndSpecializedBeanHasNameTest, SpecializingAndSpecializedBeanHaveNameTest, SpecializingBeanExtendsEnterpriseBeanTest, SpecializingBeanExtendsNothingTest, SpecializingBeanImplementsInterfaceOnly, SpecializingBeanWithoutBeanTypeOfSpecializedBeanTest, SpecializingClassExtendsNonSimpleBeanTest, StatelessWithApplicationScopeTest, StatelessWithConversationScopeTest, StatelessWithRequestScopeTest, StatelessWithSessionScopeTest, StaticFinalMethodTest, StereotypeDefinitionTest, StereotypeExtensionTest, StereotypeInheritenceTest, StereoTypeWithBindingTypesTest, StereotypeWithMultipleInterceptorBindingsTest, SyntheticBeanTest, SyntheticInterceptorVetoedTest, ThrowExceptionInProcessBeanObserverTest, ThrowExceptionTest, ThrowExceptionTest, TooManyInitializerAnnotatedConstructorsTest, TooManyScopesTest, TooManyScopeTypesTest, TransactionalObserverTest, TransientConversationLifecycleEventTest, TwoBeansSpecializeTheSameBeanTest, TwoBeansSpecializeTheSameBeanTest, TypeConflictDetectionTest, TypeVariableInjectionPointTest, TypeVariableReturnTypeTest, UnproxyableManagedBeanTest, UnproxyableTest, UnresolvedDisposalMethodDefinitionTest, UnsatisfiedDependencyTest, UnsatisfiedInjectableReferenceTest, UnserializableSimpleInjectedIntoPassivatingEnterpriseBeanTest, VerifyValuesTest, VetoTest, VetoTest, VetoTest, VisibilityOfAnnotatedTypesFromExtensionInAlphaBeanArchiveTest, VisibilityOfAnnotatedTypesFromExtensionInBravoBeanArchiveTest, VisibilityOfBeanInWebModuleFromBeanManagerInBeanLibraryTest, VisibilityOfBeanRegisteredByExtensionFromNonBeanLibraryTest

public abstract class AbstractTest
extends org.jboss.arquillian.testng.Arquillian

Abstract CDI TCK test.


Field Summary
protected  javax.enterprise.inject.spi.BeanManager beanManager
           
 
Fields inherited from class org.jboss.arquillian.testng.Arquillian
ARQUILLIAN_DATA_PROVIDER
 
Constructor Summary
AbstractTest()
           
 
Method Summary
 boolean annotationSetMatches(Set<? extends Annotation> annotations, Annotation... requiredAnnotations)
           
 boolean annotationSetMatches(Set<? extends Annotation> annotations, Class<? extends Annotation>... requiredAnnotationTypes)
          Checks if all annotations are in a given set of annotations
protected  Object deserialize(byte[] bytes)
           
protected  void destroyContext(javax.enterprise.context.spi.Context context)
           
<T> Set<javax.enterprise.inject.spi.Bean<T>>
getBeans(Class<T> type, Annotation... bindings)
           
<T> Set<javax.enterprise.inject.spi.Bean<T>>
getBeans(javax.enterprise.util.TypeLiteral<T> type, Annotation... bindings)
           
protected  Configuration getCurrentConfiguration()
           
protected  javax.enterprise.inject.spi.BeanManager getCurrentManager()
           
 Object getInstanceByName(String name)
           
<T> T
getInstanceByType(Class<T> beanType, Annotation... bindings)
           
<T> T
getInstanceByType(javax.enterprise.util.TypeLiteral<T> beanType, Annotation... bindings)
           
<T> javax.enterprise.inject.spi.Bean<T>
getUniqueBean(Class<T> type, Annotation... bindings)
           
<T> javax.enterprise.inject.spi.Bean<T>
getUniqueBean(javax.enterprise.util.TypeLiteral<T> type, Annotation... bindings)
           
protected  boolean isThrowablePresent(Class<? extends Throwable> throwableType, Throwable throwable)
          Extracted from test harness.
 boolean rawTypeSetMatches(Set<Type> types, Class<?>... requiredTypes)
           
protected  byte[] serialize(Object instance)
           
protected  void setContextActive(javax.enterprise.context.spi.Context context)
           
protected  void setContextInactive(javax.enterprise.context.spi.Context context)
           
 boolean typeSetMatches(Collection<? extends Type> types, Type... requiredTypes)
           
 
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
 

Field Detail

beanManager

@Inject
protected javax.enterprise.inject.spi.BeanManager beanManager
Constructor Detail

AbstractTest

public AbstractTest()
Method Detail

getCurrentManager

protected javax.enterprise.inject.spi.BeanManager getCurrentManager()

serialize

protected byte[] serialize(Object instance)
                    throws IOException
Throws:
IOException

deserialize

protected Object deserialize(byte[] bytes)
                      throws IOException,
                             ClassNotFoundException
Throws:
IOException
ClassNotFoundException

setContextActive

protected void setContextActive(javax.enterprise.context.spi.Context context)

setContextInactive

protected void setContextInactive(javax.enterprise.context.spi.Context context)

destroyContext

protected void destroyContext(javax.enterprise.context.spi.Context context)

getCurrentConfiguration

protected Configuration getCurrentConfiguration()

annotationSetMatches

public boolean annotationSetMatches(Set<? extends Annotation> annotations,
                                    Class<? extends Annotation>... requiredAnnotationTypes)
Checks if all annotations are in a given set of annotations

Parameters:
annotations - The annotation set
requiredAnnotationTypes - The annotations to match
Returns:
True if match, false otherwise

annotationSetMatches

public boolean annotationSetMatches(Set<? extends Annotation> annotations,
                                    Annotation... requiredAnnotations)
Parameters:
annotations - The annotation set
requiredAnnotationTypes - The required annotations
Returns:
true if speficied set matches required annotations, false otherwise

rawTypeSetMatches

public boolean rawTypeSetMatches(Set<Type> types,
                                 Class<?>... requiredTypes)

typeSetMatches

public boolean typeSetMatches(Collection<? extends Type> types,
                              Type... requiredTypes)

getUniqueBean

public <T> javax.enterprise.inject.spi.Bean<T> getUniqueBean(Class<T> type,
                                                             Annotation... bindings)

getUniqueBean

public <T> javax.enterprise.inject.spi.Bean<T> getUniqueBean(javax.enterprise.util.TypeLiteral<T> type,
                                                             Annotation... bindings)

getBeans

public <T> Set<javax.enterprise.inject.spi.Bean<T>> getBeans(Class<T> type,
                                                             Annotation... bindings)

getBeans

public <T> Set<javax.enterprise.inject.spi.Bean<T>> getBeans(javax.enterprise.util.TypeLiteral<T> type,
                                                             Annotation... bindings)

getInstanceByType

public <T> T getInstanceByType(Class<T> beanType,
                               Annotation... bindings)

getInstanceByType

public <T> T getInstanceByType(javax.enterprise.util.TypeLiteral<T> beanType,
                               Annotation... bindings)

getInstanceByName

public Object getInstanceByName(String name)

isThrowablePresent

protected boolean isThrowablePresent(Class<? extends Throwable> throwableType,
                                     Throwable throwable)
Extracted from test harness. We need this since testng expected exceptions feature is not working with exception cause - see org.testng.internal.Invoker.isExpectedException(Throwable, ExpectedExceptionsHolder).

Parameters:
throwableType -
throwable -
Returns:
true if throwable type is assignable from specified throwable or any cause in stack (works recursively), false otherwise


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