org.jboss.jsr299.tck
Class AbstractJSR299Test

java.lang.Object
  extended by org.jboss.testharness.AbstractTest
      extended by org.jboss.jsr299.tck.AbstractJSR299Test
All Implemented Interfaces:
org.testng.IHookable, org.testng.ITestNGListener
Direct Known Subclasses:
AbstractConversationTest, AddDefinitionErrorTest, AddDefinitionErrorTest, AddDeploymentProblemTest, AddingNormalScopeTest, AddingPassivatingScopeTest, AfterBeanDiscoveryFailureTest, AfterBeanDiscoveryObserverExecutionFailureTest, AfterBeanDiscoveryTest, AfterDeploymentValidationObserverExecutionFailureTest, AlternativeMetadataTest, AlternativeMetaDataTest, AmbiguousDependencyTest, AmbiguousInjectableReferenceTest, AnyInjectionTest, ApplicationContextSharedTest, ApplicationContextTest, AroundInvokeInterceptorTest, ArrayTest, AssignabilityOfRawAndParameterizedTypesTest, AsynchronousBeforeCompletionObserverTest, BeanByTypeTest, BeanDefinitionTest, BeanManagerTest, BeforeBeanDiscoveryThrowsExceptionTest, BindingAnnotationWithMemberTest, BindingAnnotationWithMemberTest, BuiltInBeansTest, BuiltinInstanceTest, CheckedExceptionWrappedTest, ChecksEventTypeWhenResolvingTest, CheckTypeParametersWhenResolvingObserversTest, CircularDependencyTest, ClassIsNotPolicyTest, ClassIsNotPolicyTest, ClientProxyTest, ClientProxyTest, ConditionalObserverTest, ConstructorHasDisposesParameterTest, ConstructorHasObservesParameterTest, ContainerEventTest, ContainerEventTest, ContextDestroysBeansTest, ContextTest, CreationalContextForNonContextualTest, CustomBeanImplementationTest, CustomDecoratorMatchingBeanWithFinalClassTest, CustomDecoratorTest, CustomInterceptorTest, DecoratorAndInterceptorTest, DecoratorDefinitionTest, DecoratorInvocationTest, DecoratorInvocationTest, DecoratorInvocationTest, DecoratorListedTwiceInBeansXmlTest, DecoratorNotInjectedTest, DecoratorResolutionTest, DecoratorWithNonPassivatingBeanConstructorTest, DecoratorWithNonPassivatingInitializerMethodTest, DecoratorWithNonPassivatingInjectedFieldTest, DefaultNamedTest, DefinitionTest, DelegateFieldInjectionPointTest, DelegateInjectionPointTest, DelegateInjectionPointTest, DelegateInjectionPointTest, DependentContextEjbTest, DependentContextTest, DependentIsConditionalObserverTest, DependentWithPublicFieldTest, DeploymentFailureTest, DeploymentTest, DestroyedInstanceReturnedByGetTest, DestroyForSameCreationalContext2Test, DestroyForSameCreationalContextTest, DirectlyExtendsNothingTest, DirectlyExtendsSimpleBeanTest, DisposalMethodDefinitionTest, DisposalMethodOnSessionBean, DuplicateBindingTypesWhenResolvingTest, DuplicateNamePrefixResolutionTest, DuplicateNameResolutionTest, DynamicLookupTest, EJBDecoratorInvocationTest, EjbInitializerMethodTest, EjbInjectionTest, EJBObserverMethodNotBusinessMethodTest, EJBRequestContextTest, EnabledDecoratorNotADecoratorTest, EnterpriseBeanDefinitionTest, EnterpriseBeanLifecycleTest, EnterpriseBeanRemoveMethodTest, EnterpriseBeanSpecializationIntegrationTest, EnterpriseBeanSpecializationTest, EnterpriseBeanViaXmlTest, EnterpriseBeanWithIllegalDependencyTest, EnterpriseBeanWithIllegalDependencyTest, EnterpriseBeanWithNonPassivatingBeanConstructorParameterInInterceptorTest, EnterpriseBeanWithNonPassivatingDecoratorTest, EnterpriseBeanWithNonPassivatingFieldInDecoratorTest, EnterpriseBeanWithNonPassivatingInitializerInDecoratorTest, EnterpriseBeanWithNonPassivatingInitializerParameterInInterceptorTest, EnterpriseBeanWithNonPassivatingInjectedFieldInDecoratorTest, EnterpriseBeanWithNonPassivatingInjectedFieldInInterceptorTest, EnterpriseBeanWithNonSerializableIntializerMethodTest, EnterpriseEventInheritenceTest, EnterpriseProducerFieldDefinitionTest, EnterpriseProducerMethodDefinitionTest, EnterpriseQualifierDefinitionTest, EnterpriseResolutionByTypeTest, EnterpriseScopeDefinitionTest, EnterpriseStereotypeDefinitionTest, EnvInjectionTest, EventBindingTypesTest, EventInjectionWithoutTypeTest, EventTest, EventTypesTest, ExceptionTest, ExtensionsTest, FinalBeanClassTest, FinalBeanMethodTest, FinalClassTest, FinalMethodTest, FireEventTest, GenericManagedBeanTest, GetFromContextualTest, GetOnInactiveContextTest, GetWithNoCreationalContextTest, ImplementsInterfaceAndExtendsNothingTest, ImplicitEventTest, IncompatibleStereotypesTest, InconsistentSpecializationTest, IndirectOverrideTest, InitializerMethodAnnotatedProducesTest, InitializerMethodTest, InitializerUnallowedDefinitionTest, InjectableReferenceTest, InjectionIntoNonContextualComponentTest, InjectionIntoWebServiceEndPointTest, InjectionOfResourceTest, InjectionPointTest, InjectionPointTest, InjectionTargetDefinitionErrorTest, InjectionTest, IntegrationWithUnifiedELTest, InterceptorBindingTypeWithMemberTest, InterceptorCalledBeforeDecoratorTest, InterceptorCanNotBeDecoratorTest, InterceptorDefinitionTest, InterceptorNotListedInBeansXmlNotEnabledTest, InterceptorNotResolvedTest, InterceptorOrderTest, InvalidInterceptorBindingAnnotationsTest, InvocationContextTest, InvocationOrderTest, InvocationOrderTest, LibraryInEarTest, LibraryInWarTest, LibraryMissingBeansXmlTest, LifecycleCallbackInterceptorExceptionTest, LifecycleCallbackInterceptorTest, ManagedBeanWithNonPassivatingDecoratorTest, ManagedBeanWithNonSerializableInterceptorClassTest, ManagerTest, ManagerTest, MethodLevelInterceptorTest, MultipleDelegateInjectionPointsTest, MultipleDisposeParametersDefinitionTest, MultipleInterceptorBindingsTest, NameDefinitionTest, NewEnterpriseBeanICTest, NewEnterpriseBeanTest, NewSimpleBeanTest, NoAnnotationWithSpecifiedNameTest, NoClassWithSpecifiedNameTest, NoDelegateInjectionPointsTest, NonBindingTypePassedToFireTest, NonBindingTypesWhenResolvingTest, NonDecoratorWithDecoratesTest, NonEmptyNamedTest, NonExistantClassInBeansXmlTest, NonExistantDecoratorClassInBeansXmlTest, NonInterceptorClassInBeansXmlTest, NonPassivationCapableProducerFieldTest, NonPassivationCapableProducerFieldTest, NonPassivationCapableProducerMethodTest, NonPassivationManagedBeanHasPassivatingScopeTest, NormalContextTest, NormalScopedBeanWithInjectionPoint, NotAllDecoratedTypesImplementedTest, NullableBeanTest, ObserverExceptionAbortsProcessingTest, ObserverExceptionRethrownTest, ObserverMethodAnnotatedDisposesTest, ObserverMethodAnnotatedInitialzerTest, ObserverMethodAnnotatedProducesTest, ObserverMethodOnIncorrectBeanTest, ObserverMethodWithParametertizedTypeTest, ObserverMethodWithTwoEventParametersTest, ObserverParameterUnallowedDefinitionTest, ObserverTest, ParameterAnnotatedDisposesTest, ParameterAnnotatedDisposesTest, ParameterAnnotatedObservesTest, ParameterAnnotatedObservesTest, ParameterizedReturnTypeWithWildcardTest, ParameterizedTypeWithTypeParameterTest, ParameterizedTypeWithWildcardTest, PassivatingContextTest, PassivatingManagedBeanWithNonPassivatingBeanConstructorTest, PassivatingManagedBeanWithNonPassivatingInitializerMethodTest, PassivatingManagedBeanWithNonPassivatingInjcetedFieldTest, PassivatingProducerMethodWithNonPassivatingParameterTest, PassivationCapableBeanWithNonPassivatingInterceptorTest, PassivationCapableBeanWithNonPassivatingInterceptorTest, PassivationCapableBeanWithNonPassivatingInterceptorTest, PassivationIdTest, PersistenceContextInjectionTest, PolicyAvailabilityTest, PrimitiveInjectionPointTest, PrivateConstructorTest, ProcessAnnotatedTypeEventThrowsExceptionTest, ProcessAnnotatedTypeTest, ProcessBeanTest, ProcessInjectionTargetEventThrowsExceptionTest, ProcessObserverMethodErrorTest, ProcessObserverMethodEventTest, ProcessObserverMethodExceptionTest, ProcessSessionBeanTest, ProducerFieldDefinitionTest, ProducerFieldLifecycleTest, ProducerMethodDefinitionTest, ProducerMethodLifecycleTest, ProducerMethodNotBusinessMethodTest, ProducerMethodSpecializationTest, ProducerTest, ProducesUnallowedDefinitionTest, QualifierDefinitionTest, RequestContextTest, ResolutionByNameTest, ResolutionByNameTest, ResolutionByTypeTest, ResolveEnterpriseEventObserverTest, ResolveEventObserversTest, ResolvingChecksBindingTypeMembersTest, SameClassListedTwiceInBeansXmlTest, SameNameTest, SameTypeListedTwiceTest, ScopeDefinitionTest, SelectEventTest, SessionBeanInjectionOrderingTest, SessionBeanInjectionTest, SessionBeanInterceptorDefinitionTest, SessionBeanInterceptorOnNonContextualEjbReferenceTest, SessionBeanInterceptorOrderTest, SessionBeanPolicyTest, SessionContextTest, SimpleBeanDefinitionTest, SimpleBeanLifecycleTest, SimpleBeanSpecializationTest, SingletonWithConversationScopeTest, SingletonWithRequestScopeTest, SingletonWithSessionScopeTest, SpecializesStaticMethodTest, SpecializingAndSpecializedBeanHasNameTest, SpecializingAndSpecializedBeanHaveNameTest, SpecializingBeanExtendsEnterpriseBeanTest, SpecializingBeanExtendsNothingTest, SpecializingBeanImplementsInterfaceOnly, SpecializingClassExtendsNonSimpleBeanTest, StatelessWithApplicationScopeTest, StatelessWithConversationScopeTest, StatelessWithRequestScopeTest, StatelessWithSessionScopeTest, StereotypeDefinitionTest, StereotypeInheritenceTest, StereoTypeWithBindingTypesTest, ThrowExceptionInProcessBeanObserverTest, TooManyInitializerAnnotatedConstructorsTest, TooManyScopesTest, TooManyScopeTypesTest, TwoBeansSpecializeTheSameBeanTest, TwoBeansSpecializeTheSameBeanTest, TwoSpecializingBeansForOneSpecializedTest, TypeVariableInjectionPointTest, UnproxyableManagedBeanTest, UnproxyableTest, UnresolvedDisposalMethodDefinitionTest, UnsatisfiedDependencyTest, UnsatisfiedInjectableReferenceTest, UnserializableSimpleInjectedIntoPassivatingEnterpriseBeanTest

public abstract class AbstractJSR299Test
extends org.jboss.testharness.AbstractTest


Constructor Summary
AbstractJSR299Test()
           
 
Method Summary
 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  JSR299Configuration 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  org.jboss.testharness.api.DeploymentException handleDeploymentFailure(org.jboss.testharness.api.DeploymentException deploymentException)
           
 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.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

AbstractJSR299Test

public AbstractJSR299Test()
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 JSR299Configuration getCurrentConfiguration()
Overrides:
getCurrentConfiguration in class org.jboss.testharness.AbstractTest

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

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)

handleDeploymentFailure

protected org.jboss.testharness.api.DeploymentException handleDeploymentFailure(org.jboss.testharness.api.DeploymentException deploymentException)
Overrides:
handleDeploymentFailure in class org.jboss.testharness.AbstractTest


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