JSR-299: Contexts and Dependency Injection for Java Enterprise Edition TCK Coverage

20091101

Contents

Chapter Summary
Section Summary
Coverage Detail
Unmatched Tests
Unversioned Tests
Test Group Summary

Coverage Distribution

 
 
 
 
 
 
 
 
 
 

Chapter Summary

Chapter Assertions Testable Total Tested Total Tests Tested
(problematic)
Tested
(working)
Coverage %
2 Concepts129105102122010297.14%
3 Programming model233221203250020391.86%
4 Inheritance and specialization9387789507889.66%
5 Dependency injection, lookup, and EL229218184214018484.40%
6 Scopes and contexts218188161199016185.64%
7 Lifecycle of contextual instances6158425204272.41%
8 Decorators5149465004693.88%
9 Interceptor bindings5147434504391.49%
10 Events8778689506887.18%
11 Portable extensions335321273357027385.05%
12 Packaging and Deployment7855415904174.55%
Total15651427124115380124186.97%

Section Summary

SectionAssertionsTestableTotal TestedTested
(problematic)
Tested
(working)
Coverage %
2 Concepts7650583.33%
2.1 Functionality provided by the container to the bean00000
2.2 Bean types22202100.00%
2.2.1 Legal bean types121212012100.00%
2.2.2 Restricting the bean types of a bean111111011100.00%
2.2.3 Typecasting between bean types11101100.00%
2.3 Qualifiers00000
2.3.1 Built-in qualifier types32303150.00%
2.3.2 Defining new qualifier types41101100.00%
2.3.3 Declaring the qualifiers of a bean44404100.00%
2.3.4 Specifying qualifiers of an injected field22202100.00%
2.3.5 Specifying qualifiers of a method or constructor parameter55505100.00%
2.4 Scopes32202100.00%
2.4.1 Built-in scope types65505100.00%
2.4.2 Defining new scope types42202100.00%
2.4.3 Declaring the bean scope33303100.00%
2.4.4 Default scope55505100.00%
2.5 Bean EL names11101100.00%
2.5.1 Declaring the bean EL name44404100.00%
2.5.2 Default bean EL names44404100.00%
2.5.3 Beans with no EL name21101100.00%
2.6 Alternatives11101100.00%
2.6.1 Declaring an alternative76606100.00%
2.7 Stereotypes54404100.00%
2.7.1 Defining new stereotypes61101100.00%
2.7.1.1 Declaring the default scope for a stereotype22202100.00%
2.7.1.2 Specifying interceptor bindings for a stereotype44404100.00%
2.7.1.3 Declaring a @Named stereotype42202100.00%
2.7.1.4 Declaring an @Alternative stereotype11101100.00%
2.7.1.5 Stereotypes with additional stereotypes32202100.00%
2.7.2 Declaring the stereotypes for a bean55505100.00%
2.7.3 Built-in stereotypes10000
2.8 Problems detected automatically by the container7410125.00%
3 Programming model00000
3.1 Managed beans44404100.00%
3.1.1 Which Java classes are managed beans?99909100.00%
3.1.2 Bean types of a managed bean11101100.00%
3.1.3 Declaring a managed bean76606100.00%
3.1.4 Specializing a managed bean77707100.00%
3.1.5 Default name for a managed bean11101100.00%
3.2 Session beans97707100.00%
3.2.1 EJB remove methods of session beans44404100.00%
3.2.2 Bean types of a session bean44404100.00%
3.2.3 Declaring a session bean66606100.00%
3.2.4 Specializing a session bean22202100.00%
3.2.5 Default name for a session bean11101100.00%
3.3 Producer methods131313013100.00%
3.3.1 Bean types of a producer method44404100.00%
3.3.2 Declaring a producer method131313013100.00%
3.3.3 Specializing a producer method33303100.00%
3.3.4 Default name for a producer method110000.00%
3.4 Producer fields141313013100.00%
3.4.1 Bean types of a producer field44404100.00%
3.4.2 Declaring a producer field99909100.00%
3.4.3 Default name for a producer field11101100.00%
3.5 Disposer methods55505100.00%
3.5.1 Disposed parameter of a disposer method33303100.00%
3.5.2 Declaring a disposer method101010010100.00%
3.5.3 Disposer method resolution44404100.00%
3.6 Resources20000
3.6.1 Declaring a resource10850562.50%
3.6.2 Bean types of a resource550000.00%
3.7 Additional built-in beans8870787.50%
3.8 Bean constructors11101100.00%
3.8.1 Declaring a bean constructor88808100.00%
3.9 Injected fields33303100.00%
3.9.1 Declaring an injected field22202100.00%
3.10 Initializer methods76606100.00%
3.10.1 Declaring an initializer method77707100.00%
3.11 The default qualifier at injection points11101100.00%
3.12 Vetoing beans22202100.00%
3.13 The qualifier @Named at injection points22202100.00%
3.14 @New qualified beans36332502575.76%
4 Inheritance and specialization00000
4.1 Inheritance of type-level metadata403636036100.00%
4.2 Inheritance of member-level metadata39393003076.92%
4.3 Specialization54404100.00%
4.3.1 Direct and indirect specialization98808100.00%
5 Dependency injection, lookup, and EL21101100.00%
5.1 Modularity54404100.00%
5.1.1 Declaring selected alternatives for a bean deployment archive111090990.00%
5.1.2 Enabled and disabled beans10000
5.1.3 Inconsistent specialization11101100.00%
5.1.4 Inter-module injection18171601694.12%
5.2 Typesafe resolution13131201292.31%
5.2.1 Unsatisfied and ambiguous dependencies33303100.00%
5.2.2 Legal injection point types3320266.67%
5.2.3 Assignability of raw and parameterized types101060660.00%
5.2.4 Primitive types and null values44404100.00%
5.2.5 Qualifier annotations with members31101100.00%
5.2.6 Multiple qualifiers44404100.00%
5.3 EL Name resolution22202100.00%
5.3.1 Ambiguous EL names33303100.00%
5.4 Client proxies53303100.00%
5.4.1 Unproxyable bean types77707100.00%
5.4.2 Client proxy invocation32202100.00%
5.5 Dependency injection15141101178.57%
5.5.1 Injection using the bean constructor4430375.00%
5.5.2 Injection of fields and initializer methods42423403480.95%
5.5.3 Destruction of dependent objects11101100.00%
5.5.4 Invocation of producer or disposer methods5530360.00%
5.5.5 Access to producer field values22202100.00%
5.5.6 Invocation of observer methods4430375.00%
5.5.7 Injection point metadata25251501560.00%
5.5.8 Bean metadata77707100.00%
5.6 Programmatic lookup55505100.00%
5.6.1 The Instance interface131313013100.00%
5.6.2 The built-in Instance6650583.33%
5.6.3 Using AnnotationLiteral and TypeLiteral22202100.00%
6 Scopes and contexts00000
6.1 The Contextual interface42202100.00%
6.1.1 The CreationalContext interface73303100.00%
6.2 The Context interface131212012100.00%
6.3 Normal scopes and pseudo-scopes83303100.00%
6.4 Dependent pseudo-scope111111011100.00%
6.4.1 Dependent objects7760685.71%
6.4.2 Destruction of objects with scope @Dependent111090990.00%
6.4.3 Dependent pseudo-scope and Unified EL21101100.00%
6.5 Contextual instances and contextual references00000
6.5.1 The active context object for a scope22202100.00%
6.5.2 Contextual instance of a bean43303100.00%
6.5.3 Contextual reference for a bean55505100.00%
6.5.4 Contextual reference validity21101100.00%
6.5.5 Injectable references21101100.00%
6.5.6 Injectable reference validity210000.00%
6.6 Passivation and passivating scopes11101100.00%
6.6.1 Passivation capable beans14870787.50%
6.6.2 Passivation capable dependencies6640466.67%
6.6.3 Passivating scopes31101100.00%
6.6.4 Validation of passivation capable beans and dependencies25252302392.00%
6.7 Context management for built-in scopes00000
6.7.1 Request context lifecycle20181701794.44%
6.7.2 Session context lifecycle88808100.00%
6.7.3 Application context lifecycle19191101157.89%
6.7.4 Conversation context lifecycle28261801869.23%
6.7.5 The Conversation interface14141201285.71%
7 Lifecycle of contextual instances00000
7.1 Restriction upon bean instantiation00000
7.2 Container invocations and interception24221401463.64%
7.3 Lifecycle of contextual instances00000
7.3.1 Lifecycle of managed beans22202100.00%
7.3.2 Lifecycle of stateful session beans33303100.00%
7.3.3 Lifecycle of stateless session and singleton beans3320266.67%
7.3.4 Lifecycle of producer methods55505100.00%
7.3.5 Lifecycle of producer fields4430375.00%
7.3.6 Lifecycle of resources20191301368.42%
8 Decorators210000.00%
8.1 Decorator beans6530360.00%
8.1.1 Declaring a decorator11101100.00%
8.1.2 Decorator delegate injection points101010010100.00%
8.1.3 Decorated types of a decorator77707100.00%
8.2 Decorator enablement and ordering66606100.00%
8.3 Decorator resolution44404100.00%
8.3.1 Assignability of raw and parameterized types for delegate injection points99909100.00%
8.4 Decorator invocation66606100.00%
9 Interceptor bindings00000
9.1 Interceptor binding types33303100.00%
9.1.1 Interceptor binding types with additional interceptor bindings32202100.00%
9.1.2 Interceptor bindings for stereotypes32202100.00%
9.2 Declaring the interceptor bindings of an interceptor5430375.00%
9.3 Binding an interceptor to a bean111111011100.00%
9.4 Interceptor enablement and ordering88808100.00%
9.5 Interceptor resolution101070770.00%
9.5.1 Interceptors with multiple bindings22202100.00%
9.5.2 Interceptor binding types with members65505100.00%
10 Events00000
10.1 Event types and qualifier types98808100.00%
10.2 Observer resolution5310133.33%
10.2.1 Assignability of type variables, raw and parameterized types3320266.67%
10.2.2 Event qualifier types with members21101100.00%
10.2.3 Multiple event qualifiers33303100.00%
10.3 Firing events44404100.00%
10.3.1 The Event interface88808100.00%
10.3.2 The built-in Event66606100.00%
10.4 Observer methods65505100.00%
10.4.1 Event parameter of an observer method44404100.00%
10.4.2 Declaring an observer method99909100.00%
10.4.3 Conditional observer methods33303100.00%
10.4.4 Transactional observer methods76606100.00%
10.5 Observer notification141180872.73%
10.5.1 Observer method invocation context440000.00%
11 Portable extensions40000
11.1 The Bean interface87707100.00%
11.1.1 The Decorator interface44404100.00%
11.1.2 The Interceptor interface66606100.00%
11.1.3 The ObserverMethod interface76606100.00%
11.2 The Producer and InjectionTarget interfaces18161401487.50%
11.3 The BeanManager object6650583.33%
11.3.1 Obtaining a reference to the CDI container43303100.00%
11.3.2 Obtaining a contextual reference for a bean33303100.00%
11.3.3 Obtaining an injectable reference6650583.33%
11.3.4 Obtaining a CreationalContext22202100.00%
11.3.5 Obtaining a Bean by type66606100.00%
11.3.6 Obtaining a Bean by name22202100.00%
11.3.7 Obtaining a passivation capable bean by identifier11101100.00%
11.3.8 Resolving an ambiguous dependency22202100.00%
11.3.9 Validating an injection point22202100.00%
11.3.10 Firing an event55505100.00%
11.3.11 Observer method resolution55505100.00%
11.3.12 Decorator resolution55505100.00%
11.3.13 Interceptor resolution44404100.00%
11.3.14 Determining if an annotation is a qualifier type, scope type, stereotype or interceptor binding type77707100.00%
11.3.15 Obtaining the active Context for a scope11101100.00%
11.3.16 Obtaining the ELResolver11101100.00%
11.3.17 Wrapping a Unified EL ExpressionFactory220000.00%
11.3.18 Obtaining an AnnotatedType for a class22202100.00%
11.3.19 Obtaining an InjectionTarget for a class2210150.00%
11.3.20 Obtaining a Producer for a field or method330000.00%
11.3.21 Obtaining an InjectionPoint330000.00%
11.3.22 Obtaining a BeanAttributes33303100.00%
11.3.23 Obtaining a Bean22202100.00%
11.3.24 Obtaining the instance of an Extension22202100.00%
11.4 Alternative metadata sources44422802866.67%
11.5 Container lifecycle events54404100.00%
11.5.1 BeforeBeanDiscovery event8870787.50%
11.5.2 AfterBeanDiscovery event111090990.00%
11.5.3 AfterDeploymentValidation event4430375.00%
11.5.4 BeforeShutdown event220000.00%
11.5.5 ProcessModule event161616016100.00%
11.5.6 ProcessAnnotatedType event88808100.00%
11.5.7 ProcessInjectionPoint event66606100.00%
11.5.8 ProcessInjectionTarget event42422802866.67%
11.5.9 ProcessProducer event14141201285.71%
11.5.10 ProcessBeanAttributes event141414014100.00%
11.5.11 ProcessBean event282727027100.00%
11.5.12 ProcessObserverMethod event55505100.00%
12 Packaging and Deployment00000
12.1 Bean deployment archives241170763.64%
12.2 Application initialization lifecycle10950555.56%
12.3 Application shutdown lifecycle30000
12.4 Bean discovery37312602683.87%
12.5 Integration with Unified EL4430375.00%

Coverage Detail

Colour Key
Assertion is covered
Assertion is not covered
Assertion test is unimplemented
Assertion is untestable

Section 2 - Concepts

a)

A bean comprises of a (nonempty) set of bean types.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testBeanTypesNonEmpty()fisheye|svn
b)

A bean comprises of a (nonempty) set of qualifiers.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testQualifiersNonEmpty()fisheye|svn
c)

A bean comprises of a scope.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testHasScopeType()fisheye|svn
e)

A bean comprises of an optional bean EL name.

Coverage

org.jboss.jsr299.tck.tests.definition.name
NameDefinitionTest.testNonDefaultNamed()fisheye|svn
NameDefinitionTest.testNotNamedInJava()fisheye|svn
f)

A bean comprises of a set of interceptor bindings.

Coverage

No tests exist for this assertion

g)

A bean comprises of a bean implementation.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testManagedBean()fisheye|svn
h)

A bean may or may not be an alternative.

Section 2.2 - Bean types

a)

A bean may have multiple bean types.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testBeanTypes()fisheye|svn
l)

All beans have the bean type java.lang.Object.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testBeanTypes()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testObjectIsInAPITypes()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testApiTypeForClassReturn()fisheye|svn

Section 2.2.1 - Legal bean types

a)

A bean type may be an interface.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testBeanTypes()fisheye|svn
b)

A bean type may be a concrete class.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testManagedBean()fisheye|svn
c)

A bean type may be an abstract class.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testAbstractApiType()fisheye|svn
d)

A bean type may be declared final.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testFinalApiType()fisheye|svn
BeanDefinitionTest.testBeanTypes()fisheye|svn
e)

A bean type may have final methods.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testBeanTypes()fisheye|svn
f)

A bean type may be a parameterized type with actual type parameters.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized
AssignabilityOfRawAndParameterizedTypesTest.testAssignabilityToRawType()fisheye|svn
g)

A bean type may be a parameterized type with type variables.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized
AssignabilityOfRawAndParameterizedTypesTest.testAssignabilityToRawType()fisheye|svn
i)

A bean type may be an array type. Two array types are considered identical only if the element type is identical.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testApiTypeForArrayTypeReturn()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testApiTypeForArrayTypeReturn()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testResolveByTypeWithArray()fisheye|svn
j)

A bean type may be a primitive type. Primitive types are considered to be identical to their corresponding wrapper types in java.lang.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testIsNullable()fisheye|svn
k)

A bean type may be a raw type.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testManagedBean()fisheye|svn
la)

A type variable is not a legal bean type.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.broken.typeVariableReturnType
TypeVariableReturnTypeTest.testTypeVariableNotAllowed()fisheye|svn
lb)

A parameterized type that contains a wildcard type parameter is not a legal bean type.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.broken.parameterizedTypeWithWildcard
ParameterizedTypeWithWildcardTest.testParameterizedReturnTypeWithWildcard()fisheye|svn

Section 2.2.2 - Restricting the bean types of a bean

The bean types of a bean may be restricted by annotating the bean class or producer method or field with the annotation @javax.enterprise.inject.Typed. When a @Typed annotation is explicitly specified, only the types whose classes are explicitly listed using the value member, together with java.lang.Object are bean types of the bean.

a)

Check managed bean

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testBeanTypesOnManagedBean()fisheye|svn
b)

Check session bean

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
EnterpriseResolutionByTypeTest.testBeanTypesOnSessionBean()fisheye|svn
c)

Check producer method

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testBeanTypesOnProducerMethod()fisheye|svn
d)

Check producer field

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testBeanTypesOnProducerField()fisheye|svn
e)

Check generic managed bean

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testGenericBeanTypesOnManagedBean()fisheye|svn
g)

Check generic producer method

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testGenericBeanTypesOnProducerMethod()fisheye|svn
h)

Check generic producer field

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testGenericBeanTypesOnProducerField()fisheye|svn

If a bean class or producer method or field specifies a @Typed annotation, and the value member specifies a class which does not correspond to a type in the unrestricted set of bean types of a bean, the container automatically detects the problem and treats it as a definition error.

j)

Check managed bean

Coverage

org.jboss.jsr299.tck.tests.definition.bean.broken.restricted
RestrictedManagedBeanTest.testInvalidTypedValueOnManagedBean()fisheye|svn
k)

Check session bean

Coverage

org.jboss.jsr299.tck.tests.definition.bean.broken.restricted
RestrictedSessionBeanTest.testInvalidTypedValueOnSessionBean()fisheye|svn
l)

Check producer method

Coverage

org.jboss.jsr299.tck.tests.definition.bean.broken.restricted
RestrictedProducerFieldTest.testInvalidTypedValueOnProducerField()fisheye|svn
m)

Check producer field

Coverage

org.jboss.jsr299.tck.tests.definition.bean.broken.restricted
RestrictedProducerMethodTest.testInvalidTypedValueOnProducerField()fisheye|svn

Section 2.2.3 - Typecasting between bean types

a)

A client of a bean may typecast its contextual reference to a bean to any bean type of the bean which is a Java interface. However, the client may not in general typecast its contextual reference to an arbitrary concrete bean type of the bean.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testBeanClientCanCastBeanInstanceToAnyBeanType()fisheye|svn

Section 2.3.1 - Built-in qualifier types

a0)

Every bean has the built-in qualifier @Any, even if it does not explicitly declare this qualifier, except for the special @New qualified beans defined in Section 3.12, "@New qualified beans".

A test exists for this untestable assertion!
aa)

If a bean does not explicitly declare a qualifier other than @Named, the bean has exactly one additional qualifier, of type @Default. This is called the default qualifier.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testDefaultBindingType()fisheye|svn
org.jboss.jsr299.tck.tests.definition.qualifier
QualifierDefinitionTest.testDefaultQualifierDeclaredInJava()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testDefaultBindingType()fisheye|svn
b)

The default qualifier is also assumed for any injection point that does not explicitly declare a qualifier.

Coverage

org.jboss.jsr299.tck.tests.definition.qualifier
QualifierDefinitionTest.testDefaultQualifierForInjectionPoint()fisheye|svn

Section 2.3.2 - Defining new qualifier types

aa)

A qualifier type is a Java annotation defined as @Target({METHOD, FIELD, PARAMETER, TYPE}) and @Retention(RUNTIME).

ab)

A qualifier type is a Java annotation defined as @Target({METHOD, FIELD, PARAMETER, TYPE}) and @Retention(RUNTIME).

ba)

A qualifier type may be declared by specifying the @javax.inject.Qualifier meta-annotation.

Coverage

org.jboss.jsr299.tck.tests.definition.qualifier
QualifierDefinitionTest.testQualifierDeclaresBindingAnnotation()fisheye|svn
d)

A qualifier type may define annotation members.

Section 2.3.3 - Declaring the qualifiers of a bean

The qualifiers of a bean are declared by annotating the bean class or producer method or field with the qualifier types.

a)

Test by annotating a bean class.

Coverage

org.jboss.jsr299.tck.tests.definition.qualifier
QualifierDefinitionTest.testQualifiersDeclaredInJava()fisheye|svn
b)

Test by annotating a producer method.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testBindingType()fisheye|svn
c)

Test by annotating a producer field.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testBindingType()fisheye|svn
d)

Any bean may declare multiple qualifier types.

Coverage

org.jboss.jsr299.tck.tests.definition.qualifier
QualifierDefinitionTest.testMultipleQualifiers()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testAllQualifiersSpecifiedForResolutionMustAppearOnBean()fisheye|svn

Section 2.3.4 - Specifying qualifiers of an injected field

a)

Qualifier types may be applied to injected fields (see Section 3.8, "Injected fields") to determine the bean that is injected, according to the rules of typesafe resolution defined in Section 5.3, "Typesafe resolution".

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testCreateInjectsFieldsDeclaredInJava()fisheye|svn
b)

A bean may only be injected to an injection point if it has all the qualifiers of the injection point.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testAllQualifiersSpecifiedForResolutionMustAppearOnBean()fisheye|svn

Section 2.3.5 - Specifying qualifiers of a method or constructor parameter

Qualifier types may be applied to parameters of producer methods, initializer methods, disposer methods, observer methods or bean constructors (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container.

a)

Test producer method.

Coverage

org.jboss.jsr299.tck.tests.definition.qualifier
QualifierDefinitionTest.testFieldInjectedFromProducerMethod()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testBindingTypesAppliedToProducerMethodParameters()fisheye|svn
b)

Test initializer method.

Coverage

org.jboss.jsr299.tck.tests.implementation.initializer
InitializerMethodTest.testBindingTypeOnInitializerParameter()fisheye|svn
c)

Test disposer method.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition
DisposalMethodDefinitionTest.testBindingTypesAppliedToDisposalMethodParameters()fisheye|svn
ca)

Test observer method.

Coverage

org.jboss.jsr299.tck.tests.event
EventTest.testObserverMethodReceivesInjectionsOnNonObservesParameters()fisheye|svn
d)

Test bean constructor.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testInjectionOfParametersIntoBeanConstructor()fisheye|svn

Section 2.4 - Scopes

a)

All beans have a scope.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testHasScopeType()fisheye|svn
b)

A scope type is represented by an annotation type.

c)

The set of scope types is extensible.

Coverage

org.jboss.jsr299.tck.tests.definition.scope
ScopeDefinitionTest.testScopeTypesAreExtensible()fisheye|svn

Section 2.4.1 - Built-in scope types

aa)

There are five standard scope types defined by this specification, all defined in the package javax.enterprise.context. The @RequestScoped, @ApplicationScoped and @SessionScoped annotations defined in Section 6.7, "Context management for built-in scopes" represent the standard scopes defined by the Java Servlets specification.

Coverage

org.jboss.jsr299.tck.tests.context
ContextTest.testBuiltInContexts()fisheye|svn
ab)

There are five standard scope types defined by this specification, all defined in the package javax.enterprise.context. The @RequestScoped, @ApplicationScoped and @SessionScoped annotations defined in Section 6.7, "Context management for built-in scopes" represent the standard scopes defined by the Java Servlets specification.

Coverage

org.jboss.jsr299.tck.tests.context
ContextTest.testBuiltInContexts()fisheye|svn
ac)

There are five standard scope types defined by this specification, all defined in the package javax.enterprise.context. The @RequestScoped, @ApplicationScoped and @SessionScoped annotations defined in Section 6.7, "Context management for built-in scopes" represent the standard scopes defined by the Java Servlets specification.

Coverage

org.jboss.jsr299.tck.tests.context
ContextTest.testBuiltInContexts()fisheye|svn
ba)

There are five standard scope types defined by this specification, all defined in the package javax.enterprise.context. The @ConversationScoped annotation represents the conversation scope defined in Section 6.7.4, "Conversation context lifecycle".

Coverage

org.jboss.jsr299.tck.tests.context.conversation
LongRunningConversationPropagatedByFacesContextTest.testConversationPropagated()fisheye|svn
ca)

There are five standard scope types defined by this specification, all defined in the package javax.enterprise.context. The @Dependent pseudo-scope is for dependent objects, as defined in Section 6.4, "Dependent pseudo-scope"

Coverage

org.jboss.jsr299.tck.tests.context
ContextTest.testBuiltInContexts()fisheye|svn
e)

If an interceptor or decorator has any scope other than @Dependent, non-portable behavior results.

Section 2.4.2 - Defining new scope types

aa)

A scope type is a Java annotation defined as @Target({TYPE, METHOD, FIELD}) and @Retention(RUNTIME).

Coverage

org.jboss.jsr299.tck.tests.definition.scope
ScopeDefinitionTest.testScopeTypeHasCorrectTarget()fisheye|svn
ab)

A scope type is a Java annotation defined as @Target({TYPE, METHOD, FIELD}) and @Retention(RUNTIME).

ac)

A scope type must not have any attributes.

ba)

All scope types must specify the @javax.inject.Scope or @javax.enterprise.context.NormalScope meta-annotation.

Coverage

org.jboss.jsr299.tck.tests.definition.scope
ScopeDefinitionTest.testScopeTypeDeclaresScopeTypeAnnotation()fisheye|svn

Section 2.4.3 - Declaring the bean scope

a)

The scope of a bean is defined by annotating the bean class or producer method or field with a scope type.

Coverage

org.jboss.jsr299.tck.tests.definition.scope
ScopeDefinitionTest.testScopeDeclaredInJava()fisheye|svn
ba)

A bean class or producer method or field may specify at most one scope type annotation. If a bean class or producer method or field specifies multiple scope type annotations, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.definition.scope.broken.tooManyScopes
TooManyScopesTest.testTooManyScopesSpecifiedInJava()fisheye|svn
c)

A scope type may be specified using a stereotype annotation, as defined in Section 2.7.2, "Declaring the stereotypes for a bean"

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype
StereotypeDefinitionTest.testStereotypeWithScopeType()fisheye|svn

Section 2.4.4 - Default scope

aa)

When no scope is explicitly declared by annotating the bean class or producer method or field the scope of a bean is defaulted.

Coverage

org.jboss.jsr299.tck.tests.definition.scope
ScopeDefinitionTest.testDefaultScope()fisheye|svn
b)

If the bean does not declare any stereotype with a declared default scope, the default scope for the bean is @Dependent.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype
StereotypeDefinitionTest.testStereotypeWithoutScopeType()fisheye|svn
c)

If all stereotypes declared by the bean that have some declared default scope have the same default scope, then that scope is the default scope for the bean.

Coverage

org.jboss.jsr299.tck.tests.definition.scope
ScopeDefinitionTest.testMultipleCompatibleScopeStereotypes()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testStereotypeSpecifiesScope()fisheye|svn
da)

If there are two different stereotypes declared by the bean that declare different default scopes, then there is no default scope and the bean must explicitly declare a scope. If it does not explicitly declare a scope, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.definition.scope
ScopeDefinitionTest.testMultipleIncompatibleScopeStereotypesWithScopeSpecified()fisheye|svn
org.jboss.jsr299.tck.tests.definition.stereotype.broken.scopeConflict
IncompatibleStereotypesTest.testMultipleIncompatibleScopeStereotypes()fisheye|svn
e)

If a bean explicitly declares a scope, any default scopes declared by stereotypes are ignored.

Coverage

org.jboss.jsr299.tck.tests.definition.scope
ScopeDefinitionTest.testScopeSpecifiedAndStereotyped()fisheye|svn
org.jboss.jsr299.tck.tests.definition.stereotype
StereotypeDefinitionTest.testExplicitScopeOverridesMergedScopesFromMultipleStereotype()fisheye|svn

Section 2.5 - Bean EL names

a)

A valid bean EL name is a period-separated list of valid EL identifiers

Coverage

org.jboss.jsr299.tck.tests.lookup.el
ResolutionByNameTest.testELResolverReturnsContextualInstance()fisheye|svn

Section 2.5.1 - Declaring the bean EL name

To specify the EL name of a bean, the qualifier @javax.inject.Named is applied to the bean class or producer method or field.

a)

Test with a bean class.

Coverage

org.jboss.jsr299.tck.tests.definition.name
NameDefinitionTest.testNonDefaultNamed()fisheye|svn
b)

Test with a producer method.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testNamedMethod()fisheye|svn
c)

Test with a producer field.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testNamedField()fisheye|svn
d)

If the @Named annotation does not specify the value member, the EL name is defaulted.

Coverage

org.jboss.jsr299.tck.tests.definition.name
NameDefinitionTest.testDefaultNamed()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testDefaultNamedMethod()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testDefaultNamedField()fisheye|svn

Section 2.5.2 - Default bean EL names

A default EL name must be assigned by the container when a bean class or producer method or field of a bean declares a @Named annotation and no EL name is explicitly specified by the value member.

a)

Test with a bean class.

Coverage

org.jboss.jsr299.tck.tests.definition.name
NameDefinitionTest.testDefaultNamed()fisheye|svn
b)

Test with a producer method.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testDefaultNamedMethod()fisheye|svn
c)

Test with a producer field.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testDefaultNamedField()fisheye|svn
e)

A default EL name must be assigned by the container when a bean declares a stereotype that declares an empty @Named annotation, and the bean does not explicitly specify an EL name.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype.defaultNamed
DefaultNamedTest.testStereotypeWithEmptyNamed()fisheye|svn

Section 2.5.3 - Beans with no EL name

a)

If @Named is not declared by the bean, nor by its stereotypes, a bean has no EL name.

Coverage

org.jboss.jsr299.tck.tests.definition.name
NameDefinitionTest.testNotNamedInStereotype()fisheye|svn
NameDefinitionTest.testNotNamedInJava()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testDefaultNamedField()fisheye|svn
b)

If an interceptor or decorator has a name, non-portable behavior results.

Section 2.6 - Alternatives

a)

An alternative is a bean that must be explicitly declared in the beans.xml file if it should be available for lookup, injection or EL resolution.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.deployment
AlternativeInLibraryWithExtensionTest.testAlternative()fisheye|svn
org.jboss.jsr299.tck.tests.alternative
AlternativeAvailabilityTest.testAlternativeAvailability()fisheye|svn

Section 2.6.1 - Declaring an alternative

An alternative may be declared by annotating the bean class or producer method or field with the @Alternative annotation.

a)

Test with a bean class.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.deployment
AlternativeInLibraryWithExtensionTest.testAlternative()fisheye|svn
org.jboss.jsr299.tck.tests.alternative
AlternativeAvailabilityTest.testAlternativeAvailability()fisheye|svn
ab)

Test with a producer method.

Coverage

org.jboss.jsr299.tck.tests.alternative
AlternativeAvailabilityTest.testProducerAlternativesOnMethodAndField()fisheye|svn
ac)

Test with a producer field.

Coverage

org.jboss.jsr299.tck.tests.alternative
AlternativeAvailabilityTest.testProducerAlternativesOnMethodAndField()fisheye|svn

An alternative may be declared by annotating a bean, producer method or producer field with a stereotype that declares an @Alternative annotation.

b)

Test with a bean.

Coverage

org.jboss.jsr299.tck.tests.alternative
AlternativeAvailabilityTest.testAnyEnabledAlternativeStereotypeMakesAlternativeEnabled()fisheye|svn
c)

Test with a producer method.

Coverage

org.jboss.jsr299.tck.tests.alternative
AlternativeAvailabilityTest.testStereotypeAlternativeOnProducerMethodAndField()fisheye|svn
d)

Test with a producer field.

Coverage

org.jboss.jsr299.tck.tests.alternative
AlternativeAvailabilityTest.testStereotypeAlternativeOnProducerMethodAndField()fisheye|svn
e)

If an interceptor or decorator is an alternative, non-portable behavior results.

Section 2.7 - Stereotypes

a)

A stereotype may specify that all beans with the stereotype have defaulted bean EL names.

Coverage

org.jboss.jsr299.tck.tests.definition.name
NameDefinitionTest.testStereotypeDefaultsName()fisheye|svn
org.jboss.jsr299.tck.tests.definition.stereotype.defaultNamed
DefaultNamedTest.testStereotypeWithEmptyNamed()fisheye|svn
aa)

A stereotype may specify that all beans with the stereotype are alternatives.

Coverage

org.jboss.jsr299.tck.tests.alternative
AlternativeAvailabilityTest.testAnyEnabledAlternativeStereotypeMakesAlternativeEnabled()fisheye|svn

A bean may declare zero, one or multiple stereotypes.

b)

A bean may declare zero stereotypes.

c)

Test with one stereotype.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype
StereotypeDefinitionTest.testOneStereotypeAllowed()fisheye|svn
d)

Test with multiple stereotypes.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype
StereotypeDefinitionTest.testMultipleStereotypesAllowed()fisheye|svn

Section 2.7.1 - Defining new stereotypes

A beans stereotype is a Java annotation defined as @Target({TYPE, METHOD, FIELD}), @Target(TYPE), @Target(METHOD), @Target(FIELD) or @Target({METHOD, FIELD}) and @Retention(RUNTIME).

aa)

Test @Target({TYPE, METHOD, FIELD}).

ab)

Test @Target(TYPE).

ac)

Test @Target(FIELD).

ad)

Test @Target({METHOD, FIELD}).

ae)

@Retention(RUNTIME) - untestable.

b)

A stereotype may be declared by specifying the @javax.enterprise.inject.Stereotype meta-annotation.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype
StereotypeDefinitionTest.testOneStereotypeAllowed()fisheye|svn

Section 2.7.1.1 - Declaring the default scope for a stereotype

The default scope of a stereotype is defined by annotating the stereotype with a scope type. A stereotype may declare at most one scope. If a stereotype declares more than one scope, the container automatically detects the problem and treats it as a definition error.

aa)

Test with one scope.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype
StereotypeDefinitionTest.testStereotypeWithScopeType()fisheye|svn
StereotypeDefinitionTest.testStereotypeWithoutScopeType()fisheye|svn
ab)

Test that a stereotype with multiple scopes throws an exception.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype.broken.tooManyScopes
TooManyScopeTypesTest.testStereotypeWithTooManyScopeTypes()fisheye|svn

Section 2.7.1.2 - Specifying interceptor bindings for a stereotype

a0)

The interceptor bindings of a stereotype are defined by annotating the stereotype with the interceptor binding types.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype.interceptor
StereotypeWithMultipleInterceptorBindingsTest.testMultipleInterceptorBindings()fisheye|svn
a)

A stereotype may declare zero interceptor bindings.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype
StereotypeDefinitionTest.testOneStereotypeAllowed()fisheye|svn
b)

A stereotype may declare one interceptor bindings.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testStereotypeInterceptorBindings()fisheye|svn
c)

A stereotype may declare multiple interceptor bindings.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype.interceptor
StereotypeWithMultipleInterceptorBindingsTest.testMultipleInterceptorBindings()fisheye|svn

Section 2.7.1.3 - Declaring a @Named stereotype

aaa)

A stereotype may declare an empty @Named annotation, which specifies that every bean with the stereotype has a defaulted name when a name is not explicitly specified by the bean.

Coverage

org.jboss.jsr299.tck.tests.definition.name
NameDefinitionTest.testStereotypeDefaultsName()fisheye|svn
org.jboss.jsr299.tck.tests.definition.stereotype.defaultNamed
DefaultNamedTest.testStereotypeWithEmptyNamed()fisheye|svn
aab)

If a stereotype declares a non-empty @Named annotation, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype.broken.nonEmptyNamed
NonEmptyNamedTest.testStereotypeWithNonEmptyNamed()fisheye|svn
b)

A stereotype should not declare any qualifier annotation other than @Named. If a stereotype declares any other qualifier annotation, non-portable behavior results.

c)

A stereotype should not be annotated @Typed. If a stereotype is annotated @Typed, non-portable behavior results.

Section 2.7.1.4 - Declaring an @Alternative stereotype

a)

A stereotype may declare an @Alternative annotation, which specifies that every bean with the stereotype is an alternative.

Coverage

org.jboss.jsr299.tck.tests.alternative
AlternativeAvailabilityTest.testAnyEnabledAlternativeStereotypeMakesAlternativeEnabled()fisheye|svn

Section 2.7.1.5 - Stereotypes with additional stereotypes

a)

A stereotype may declare other stereotypes.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype.inheritance
StereotypeInheritenceTest.testInheritence()fisheye|svn
b)

Stereotype declarations are transitive - a stereotype declared by a second stereotype is inherited by all beans and other stereotypes that declare the second stereotype.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype.inheritance
StereotypeInheritenceTest.testInheritence()fisheye|svn
c)

Stereotypes declared @Target(TYPE) may not be applied to stereotypes declared @Target({TYPE, METHOD, FIELD}), @Target(METHOD), @Target(FIELD), @Target({METHOD, FIELD}).

Section 2.7.2 - Declaring the stereotypes for a bean

Stereotype annotations may be applied to a bean class or producer method or field.

a)

Test with a bean class.

Coverage

org.jboss.jsr299.tck.tests.definition.scope
ScopeDefinitionTest.testScopeSpecifiedAndStereotyped()fisheye|svn
b)

Test with a producer method.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testStereotypeSpecifiesScope()fisheye|svn
c)

Test with a producer field.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testStereotype()fisheye|svn
db)

The default scope declared by the stereotype may be overridden by the bean.

Coverage

org.jboss.jsr299.tck.tests.definition.scope
ScopeDefinitionTest.testWebBeanScopeTypeOverridesStereotype()fisheye|svn
e)

Multiple stereotypes may be applied to the same bean.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype
StereotypeDefinitionTest.testMultipleStereotypesAllowed()fisheye|svn
StereotypeDefinitionTest.testExplicitScopeOverridesMergedScopesFromMultipleStereotype()fisheye|svn

Section 2.7.3 - Built-in stereotypes

aa)

The built-in stereotype @javax.enterprise.inject.Model is intended for use with beans that define the model layer of an MVC web application architecture such as JSF.

Section 2.8 - Problems detected automatically by the container

a)

When the application violates a rule defined by this specification, the container automatically detects the problem. There are three kinds of problem - definition errors occur when a single bean definition violates the rules of this specification, deployment problems occur when there are problems resolving dependencies, or inconsistent specialization, in a particular deployment, and exceptions occur at runtime.

b)

Definition errors are developer errors. They may be detected by tooling at development time, and are also detected by the container at initialization time. If a definition error exists in a deployment, initialization will be aborted by the container.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype.broken.tooManyScopes
TooManyScopeTypesTest.testStereotypeWithTooManyScopeTypes()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable.array
ArrayTest.testInjectionPointWithArrayType()fisheye|svn
ba)

If a definition error exists, the container must throw a subclass of javax.enterprise.inject.spi.DefinitionException.

Coverage

No tests exist for this assertion

c)

Deployment problems are detected by the container at initialization time. If a deployment problem exists in a deployment, initialization will be aborted by the container.

Coverage

No tests exist for this assertion

ca)

If a deployment problem occurs, the container must throw a subclass of javax.enterprise.inject.spi.DeploymentException.

Coverage

No tests exist for this assertion

d)

The container is permitted to define a non-portable mode, for use at development time, in which some definition errors and deployment problems do not cause application initialization to abort.

e)

Exceptions represent problems that may not be detected until they actually occur at runtime. All exceptions defined by this specification are unchecked exceptions. All exceptions defined by this specification may be safely caught and handled by the application.

Section 3.1 - Managed beans

f0)

If the bean class of a managed bean is annotated with both the @Interceptor and @Decorator stereotypes, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.broken.interceptorCanNotBeDecorator
InterceptorCanNotBeDecoratorTest.testInterceptorCanNotAlsoBeDecorator()fisheye|svn
fa)

If a managed bean has a public field, it must have scope @Dependent.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition
SimpleBeanDefinitionTest.testDependentScopedBeanCanHavePublicField()fisheye|svn
fba)

If a managed bean with a public field declares any scope other than @Dependent, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition.dependentWithPublicField
DependentWithPublicFieldTest.testNonDependentScopedBeanCanNotHavePublicField()fisheye|svn
g)

If the managed bean class is a generic type, it must have scope @Dependent. If a managed bean with a parameterized bean class declares any scope other than @Dependent, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.definition.bean.genericbroken
GenericManagedBeanTest.testNonDependentGenericManagedBeanNotOk()fisheye|svn

Section 3.1.1 - Which Java classes are managed beans?

b)

A top-level Java class is not a managed bean if it is a non-static inner class.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition
SimpleBeanDefinitionTest.testNonStaticInnerClassDeclaredInJavaNotDiscovered()fisheye|svn
ba)

A top-level Java class that is a static inner class can be a managed bean.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition
SimpleBeanDefinitionTest.testStaticInnerClassDeclaredInJavaAllowed()fisheye|svn
ca)

A top-level Java class is not a managed bean if it is an abstract class, unless it is annotated @Decorator.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition
SimpleBeanDefinitionTest.testAbstractClassDeclaredInJavaNotDiscovered()fisheye|svn
cb)

A top-level Java class is not a managed bean if it is an interface, unless it is annotated @Decorator.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition
SimpleBeanDefinitionTest.testInterfaceNotDiscoveredAsSimpleBean()fisheye|svn
f)

A top-level Java class is not a managed bean if it is annotated with any of the EJB component-defining annotations

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition
EnterpriseBeanNotDiscoveredAsManagedBeanTest.testClassesImplementingEnterpriseBeanInterfaceNotDiscoveredAsSimpleBean()fisheye|svn
g)

A top-level Java class is not a managed bean if it implements javax.enterprise.inject.spi.Extension.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition
SimpleBeanDefinitionTest.testExtensionNotDiscoveredAsSimpleBean()fisheye|svn
n)

A top-level Java class is not a managed bean if it is declared as an EJB bean class in ejb-jar.xml

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanViaXmlTest.testEjbDeclaredInXmlNotSimpleBean()fisheye|svn
p)

A top-level Java class is only a managed bean if it has an appropriate constructor - a constructor with no parameters.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition
SimpleBeanDefinitionTest.testSimpleBeanOnlyIfConstructorParameterless()fisheye|svn
q)

A top-level Java class is only a managed bean if it has an appropriate constructor - a constructor annotated @Inject.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition
SimpleBeanDefinitionTest.testSimpleBeanOnlyIfConstructorIsInitializer()fisheye|svn

Section 3.1.2 - Bean types of a managed bean

a)

The unrestricted set of bean types for a managed bean contains the bean class, every superclass and all interfaces it implements directly or indirectly.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testBeanTypes()fisheye|svn

Section 3.1.3 - Declaring a managed bean

a)

A managed bean with a constructor that takes no parameters does not require any special annotations

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition
SimpleBeanDefinitionTest.testEmptyConstructorUsed()fisheye|svn
ab)

If the managed bean does not have a constructor that takes no parameters, it must have a constructor annotated @Inject. No additional special annotations are required.

A bean class may also specify a scope, name, stereotypes and/or qualifiers.

ba)

Test a bean with a scope.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testHasScopeType()fisheye|svn
bb)

Test a bean with a name.

Coverage

org.jboss.jsr299.tck.tests.definition.name
NameDefinitionTest.testNonDefaultNamed()fisheye|svn
bd)

Test a bean with a stereotype.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testMultipleStereotypes()fisheye|svn
be)

Test a bean with a qualifier.

Coverage

org.jboss.jsr299.tck.tests.definition.qualifier
QualifierDefinitionTest.testQualifiersDeclaredInJava()fisheye|svn
c)

A managed bean may extend another managed bean.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testBeanExtendsAnotherBean()fisheye|svn

Section 3.1.4 - Specializing a managed bean

If a bean class of a managed bean X is annotated @Specializes, then the bean class of X must directly extend the bean class of another managed bean Y. Then X directly specializes Y, as defined in Section 4.3, "Specialization".

aa)

Test that a specializing bean has all its own qualifiers and the qualifiers of the specialized bean.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.simple
SimpleBeanSpecializationTest.testSpecializingBeanHasQualifiersOfSpecializedAndSpecializingBean()fisheye|svn
ab)

Test that a specializing bean has the name of the specialized bean.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.simple
SimpleBeanSpecializationTest.testSpecializingBeanHasNameOfSpecializedBean()fisheye|svn
ac)

Test a specialized bean extending a managed bean.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testSpecializedBeanExtendsManagedBean()fisheye|svn

If the bean class of X does not directly extend the bean class of another managed bean, the container automatically detects the problem and treats it as a definition error.

da)

Test a specializing bean extending a non simple bean.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.noextend3
SpecializingClassExtendsNonSimpleBeanTest.testSpecializingClassExtendsNonSimpleBean()fisheye|svn
db)

Test a specializing bean extending nothing.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.noextend2
SpecializingBeanExtendsNothingTest.testSpecializingClassDirectlyExtendsNothing()fisheye|svn
dc)

Test a specializing bean directly extending an enterprise bean class.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.extendejb
SpecializingBeanExtendsEnterpriseBeanTest.testSpecializingClassDirectlyExtendsEnterpriseBean()fisheye|svn
dd)

Test a specializing bean implementing an interface and extending nothing.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.noextend1
SpecializingBeanImplementsInterfaceOnly.testSpecializingClassImplementsInterfaceAndExtendsNothing()fisheye|svn

Section 3.1.5 - Default name for a managed bean

a)

The default name for a managed bean is the unqualified class name of the bean class, after converting the first character to lower case

Coverage

org.jboss.jsr299.tck.tests.definition.name
NameDefinitionTest.testDefaultNamed()fisheye|svn

Section 3.2 - Session beans

aa)

A session bean is a bean that is implemented by a session bean with an EJB 3.x client view. The basic lifecycle and semantics of EJB session beans are defined by the EJB specification.

b)

A stateless session bean must belong to the @Dependent pseudo-scope

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testStatelessMustBeDependentScoped()fisheye|svn
c)

A singleton bean must belong to either the @ApplicationScoped scope or to the @Dependent pseudo-scope

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testSingletonWithDependentScopeOK()fisheye|svn
EnterpriseBeanDefinitionTest.testSingletonWithApplicationScopeOK()fisheye|svn
da)

If a session bean specifies an illegal scope, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.broken.statelessWithConversationScope
StatelessWithConversationScopeTest.testStatelessWithConversationScopeFails()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.enterprise.broken.statelessWithRequestScope
StatelessWithRequestScopeTest.testStatelessWithRequestScopeFails()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.enterprise.broken.singletonWithRequestScope
SingletonWithRequestScopeTest.testSingletonWithRequestScopeFails()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.enterprise.broken.singletonWithSessionScope
SingletonWithSessionScopeTest.testSingletonWithSessionScopeFails()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.enterprise.broken.statelessWithApplicationScope
StatelessWithApplicationScopeTest.testStatelessWithSessionScopeFails()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.enterprise.broken.statelessWithSessionScope
StatelessWithSessionScopeTest.testStatelessWithSessionScopeFails()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.enterprise.broken.singletonWithConversationScope
SingletonWithConversationScopeTest.testSingletonWithConversationScopeFails()fisheye|svn
e)

A stateful session bean may have any scope.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testBeanWithScopeAnnotation()fisheye|svn
f)

When a contextual instance of a session bean is obtained via the dependency injection service, the behavior of SessionContext.getInvokedBusinessInterface() is specific to the container implementation. Portable applications should not rely upon the value returned by this method.

g)

If the bean class of a session bean is annotated @Interceptor, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.broken.statelessInterceptor
InterceptorAnnotatedStatelessSessionBeanTest.testStatelessSessionBeanNotAllowedToBeInterceptor()fisheye|svn
h)

If the bean class of a session bean is annotated @Decorator, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.broken.statelessDecorator
DecoratorAnnotatedStatelessSessionBeanTest.testStatelessSessionBeanNotAllowedToBeDecorator()fisheye|svn
i)

If the session bean class is a generic type, it must have scope @Dependent. If a session bean with a parameterized bean class declares any scope other than @Dependent, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.broken.genericStateless
GenericStatelessSessionBeanTest.testRequestScopedGenericStatelessSessionBean()fisheye|svn

Section 3.2.1 - EJB remove methods of session beans

a)

If a session bean is a stateful session bean, and the scope is @Dependent, the application may call any EJB remove method of a contextual instance of the session bean.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.remove
EnterpriseBeanRemoveMethodTest.testApplicationMayCallAnyRemoveMethodOnDependentScopedSessionEnterpriseBeans()fisheye|svn
b)

If a session bean is a stateful session bean, and the scope is not @Dependent, the application may not directly call any EJB remove method of any instance of the session bean. If the application directly calls an EJB remove method of any contextual instance of a session bean that is a stateful session bean and declares any scope other than @Dependent, an UnsupportedOperationException is thrown

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.remove
EnterpriseBeanRemoveMethodTest.testApplicationCannotCallRemoveMethodOnNonDependentScopedSessionEnterpriseBean()fisheye|svn
da)

If the application directly calls an EJB remove method of a contextual instance of a session bean that is a stateful session bean and has scope @Dependent then no parameters are passed to the method by the container.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.remove
EnterpriseBeanRemoveMethodTest.testApplicationMayCallRemoveMethodOnDependentScopedSessionEnterpriseBeansButNoParametersArePassed()fisheye|svn
dba)

If the application directly calls an EJB remove method of a contextual instance of a session bean that is a stateful session bean and has scope @Dependent then the container ignores the instance instead of destroying it when Contextual.destroy() is called, as defined in Section 6.5, "Lifecycle of stateful session beans"

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle
EnterpriseBeanLifecycleTest.testRemovedEjbIgnored()fisheye|svn

Section 3.2.2 - Bean types of a session bean

aa)

The unrestricted set of bean types for a session bean contains all local interfaces of the bean and their superinterfaces.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testBeanTypesAreLocalInterfacesWithoutWildcardTypesOrTypeVariablesWithSuperInterfaces()fisheye|svn
ba)

If the session bean has a bean class local view, the set of bean types contains the bean class and all superclasses.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testEnterpriseBeanClassLocalView()fisheye|svn
EnterpriseBeanViaXmlTest.testEjbDeclaredInXmlNotSimpleBean()fisheye|svn
c)

java.lang.Object is a bean type of every session bean

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testObjectIsInAPITypes()fisheye|svn
d)

Remote interfaces are not included in the set of bean types

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testRemoteInterfacesAreNotInAPITypes()fisheye|svn

Section 3.2.3 - Declaring a session bean

aa)

A session bean does not require any special annotations apart from the component-defining annotation (or XML declaration) required by the EJB specification.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testObjectIsInAPITypes()fisheye|svn

A bean class may also specify a scope, name, stereotypes and/or qualifiers.

ba)

Test a bean class with a scope.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testBeanWithScopeAnnotation()fisheye|svn
bb)

Test a bean class with a name.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testBeanWithNamedAnnotation()fisheye|svn
bd)

Test a bean class with a stereotype.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testBeanWithStereotype()fisheye|svn
be)

Test a bean class with a qualifier.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testBeanWithQualifiers()fisheye|svn
c)

A session bean class may extend another bean class.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testBeanTypesAreLocalInterfacesWithoutWildcardTypesOrTypeVariablesWithSuperInterfaces()fisheye|svn

Section 3.2.4 - Specializing a session bean

aa)

If a bean class of a session bean X is annotated @Specializes, then the bean class of X must directly extend the bean class of another session bean Y. Then X directly specializes Y, as defined in Section 4.3 "Specialization".

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise
EnterpriseBeanSpecializationTest.testSpecializingBeanHasBindingsOfSpecializedAndSpecializingBean()fisheye|svn
da)

If the bean class of X does not directly extend the bean class of another session bean, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.broken.directlyExtendsSimpleBean
DirectlyExtendsSimpleBeanTest.testSpecializingClassDirectlyExtendsSimpleBean()fisheye|svn
org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.broken.directlyExtendsNothing
DirectlyExtendsNothingTest.testSpecializingClassDirectlyExtendsNothing()fisheye|svn
org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.broken.implementInterfaceAndExtendsNothing
ImplementsInterfaceAndExtendsNothingTest.testSpecializingClassImplementsInterfaceAndExtendsNothing()fisheye|svn

Section 3.2.5 - Default name for a session bean

a)

The default name for a managed bean is the unqualified class name of the session bean class, after converting the first character to lower case.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testDefaultName()fisheye|svn

Section 3.3 - Producer methods

aa)

A producer method must be a non-abstract method of a managed bean class or session bean class.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testProducerOnNonBean()fisheye|svn
b)

A producer method may be static.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testStaticMethod()fisheye|svn
c)

A producer method may be non-static.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testDefaultBindingType()fisheye|svn
d)

If the bean is a session bean, the producer method must be either a business method of the EJB or a static method of the bean class

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.broken.enterprise.nonbusiness
ProducerMethodNotBusinessMethodTest.testProducerMethodOnSessionBeanMustBeBusinessMethod()fisheye|svn
e)

If a producer method sometimes returns a null value, then the producer method must have scope @Dependent.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testDependentProducerReturnsNullValue()fisheye|svn
f)

If a producer method returns a null value at runtime, and the producer method declares scope other than @Dependent, an IllegalProductException is thrown by the container. This restriction allows the container to use a client proxy, as defined in Section 5.4, "Client proxies".

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testNonDependentProducerReturnsNullValue()fisheye|svn
ga)

If the producer method return type is a parameterized type, it must specify an actual type parameter or type variable for each type parameter.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testParameterizedReturnType()fisheye|svn
ha)

If a producer method return type contains a wildcard type parameter the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.broken.parameterizedTypeWithWildcard
ParameterizedTypeWithWildcardTest.testParameterizedReturnTypeWithWildcard()fisheye|svn
iaa)

If the producer method return type is a parameterized type with a type variable, it must have scope @Dependent.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testTypeVariableReturnType()fisheye|svn
iab)

If a producer method with a parameterized return type with a type variable declares any scope other than @Dependent, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.broken.parameterizedTypeWithTypeParameter
ParameterizedReturnTypeWithTypeVariableTest.testNonDependentScopedProducerMethodWithParameterizedTypeWithTypeVariable()fisheye|svn
ib)

If a producer method return type is a type variable the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.broken.typeVariableReturnType
TypeVariableReturnTypeTest.testTypeVariableNotAllowed()fisheye|svn
j)

The application may call producer methods directly. However, if the application calls a producer method directly, no parameters will be passed to the producer method by the container; the returned object is not bound to any context; and its lifecycle is not managed by the container.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle
ProducerMethodLifecycleTest.testWhenApplicationInvokesProducerMethodParametersAreNotInjected()fisheye|svn
k)

A bean may declare multiple producer methods.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testBindingType()fisheye|svn
ProducerMethodDefinitionTest.testScopeType()fisheye|svn

Section 3.3.1 - Bean types of a producer method

a)

If the return type of a producer method is an interface, the unrestricted set of bean types contains the return type, all interfaces it extends directly or indirectly and java.lang.Object

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testApiTypeForInterfaceReturn()fisheye|svn

If a return type of a producer method is primitive or is a Java array type, the unrestricted set of bean types contains exactly two types: the method return type and java.lang.Object.

ba)

Check primitive return type

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testApiTypeForPrimitiveReturn()fisheye|svn
bb)

Check array return type

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testApiTypeForArrayTypeReturn()fisheye|svn
c)

If the return type of a producer method is a class, the unrestricted set of bean types contains the return type, every superclass and all interfaces it implements directly or indirectly.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testApiTypeForClassReturn()fisheye|svn

Section 3.3.2 - Declaring a producer method

a)

A producer method may be declared by annotating a method with the @javax.enterprise.inject.Produces annotation

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testDefaultBindingType()fisheye|svn
ba)

A producer method may specify a scope.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testScopeType()fisheye|svn
ProducerMethodDefinitionTest.testStereotypeSpecifiesScope()fisheye|svn
bb)

A producer method may specify a name.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testNamedMethod()fisheye|svn
ProducerMethodDefinitionTest.testDefaultNamedMethod()fisheye|svn
bd)

A producer method may specify stereotypes.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testStereotypeSpecifiesScope()fisheye|svn
be)

A producer method may specify qualifiers.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testBindingType()fisheye|svn

If a producer method is annotated @Inject, has a parameter annotated @Disposes, or has a parameter annotated @Observes, the container automatically detects the problem and treats it as a definition error.

ca)

Test with a producer method annotated @Inject.

Coverage

org.jboss.jsr299.tck.tests.implementation.initializer.broken.methodAnnotatedProduces
InitializerMethodAnnotatedProducesTest.testInitializerMethodAnnotatedProduces()fisheye|svn
da)

Test with a producer method annotated @Disposes.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.broken.parameterAnnotatedDisposes
ParameterAnnotatedDisposesTest.testProducerMethodWithParameterAnnotatedDisposes()fisheye|svn
ea)

Test with a producer method annotated @Observes.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.broken.parameterAnnotatedObserves
ParameterAnnotatedObservesTest.testProducerMethodWithParameterAnnotatedObserves()fisheye|svn
fa)

If a non-static method of a session bean class is annotated @Produces, and the method is not a business method of the session bean, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.broken.enterprise.nonbusiness
ProducerMethodNotBusinessMethodTest.testProducerMethodOnSessionBeanMustBeBusinessMethod()fisheye|svn
ga)

Interceptors and decorators may not declare producer methods. If an interceptor or decorator has a method annotated @Produces, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.broken.interceptor
ProducerMethodOnInterceptorTest.testProducerMethodNotAllowedOnInterceptor()fisheye|svn
gb)

Interceptors and decorators may not declare producer methods. If an interceptor or decorator has a method annotated @Produces, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.broken.decorator
ProducerMethodOnDecoratorTest.testProducerMethodNotAllowedOnDecorator()fisheye|svn
h)

A producer method may have any number of parameters.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testBindingTypesAppliedToProducerMethodParameters()fisheye|svn
i)

All producer method parameters are injection points.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testBindingTypesAppliedToProducerMethodParameters()fisheye|svn

Section 3.3.3 - Specializing a producer method

aa)

If a producer method X is annotated @Specializes, then it must be non-static and directly override another producer method Y. Then X directly specializes Y, as defined in Section 4.3 "Specialization".

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method
ProducerMethodSpecializationTest.testSpecializingBeanHasBindingsOfSpecializedAndSpecializingBean()fisheye|svn
ba)

If a producer method is static, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method.broken.specializesStaticMethod
SpecializesStaticMethodTest.testSpecializedStaticMethod()fisheye|svn
ca)

If a producer method does not directly override another producer method, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method.broken.indirectOverride
IndirectOverrideTest.testSpecializedMethodIndirectlyOverridesAnotherProducerMethod()fisheye|svn

Section 3.3.4 - Default name for a producer method

a)

The default name for a producer method is the method name, unless the method follows the JavaBeans property getter naming convention, in which case the default name is the JavaBeans property name

Coverage

No tests exist for this assertion

Section 3.4 - Producer fields

aa)

A producer field must be a field of a managed bean class or session bean class

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle
ProducerFieldLifecycleTest.testProducerFieldNotAnotherBean()fisheye|svn
ab)

A producer field must be a field of a managed bean class or session bean class

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition.enterprise
EnterpriseProducerFieldDefinitionTest.testStaticProducerField()fisheye|svn
b)

A producer field may be static.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle
ProducerFieldLifecycleTest.testProducerStaticFieldBean()fisheye|svn
c)

A producer field may be non-static.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testBeanDeclaresMultipleProducerFields()fisheye|svn
ca)

If the bean is a session bean, the producer field must be a static field of the bean class.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition.enterprise
EnterpriseProducerFieldDefinitionTest.testStaticProducerField()fisheye|svn
d)

If a producer field sometimes contains a null value when accessed, then the producer field must have scope @Dependent

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle
ProducerFieldLifecycleTest.testProducerFieldReturnsNullIsDependent()fisheye|svn
e)

If a producer method contains a null value at runtime, and the producer field declares any other scope, an IllegalProductException is thrown by the container. This restriction allows the container to use a client proxy, as defined in Section 5.4, "Client proxies"

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle
ProducerFieldLifecycleTest.testProducerFieldReturnsNullIsNotDependent()fisheye|svn
fa)

If the producer field type is a parameterized type, it must specify an actual type parameter or type variable for each type parameter

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testParameterizedReturnType()fisheye|svn
fb)

If the producer field type is a parameterized type, it must specify an actual type parameter or type variable for each type parameter

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testProducerFieldWithTypeVariable()fisheye|svn
ga)

If a producer field type contains a wildcard type parameter the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition.broken.parameterizedReturnTypeWithWildcard
ParameterizedReturnTypeWithWildcardTest.testParameterizedReturnTypeWithWildcard()fisheye|svn
gb)

If the producer field type is a parameterized type with a type variable, it must have scope @Dependent. If a producer field with a parameterized type with a type variable declares any scope other than @Dependent, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition.broken.typeVariable2
RequestScopedProducerFieldWithTypeVariableTest.testRequestScopedProducerFieldParameterizedWithTypeVariableNotAllowed()fisheye|svn
ha)

If a producer field type is a type variable the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition.broken.typeVariable
ProducerFieldWithTypeVariableTest.testProducerFieldWithTypeOfTypeVariableNotAllowed()fisheye|svn
i)

The application may access producer fields directly. However, if the application accesses a producer field directly, the returned object is not bound to any context; and its lifecycle is not managed by the container

j)

A bean may declare multiple producer fields

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testBeanDeclaresMultipleProducerFields()fisheye|svn

Section 3.4.1 - Bean types of a producer field

a)

The bean types of a producer field depend upon the field type. If the field type is an interface, the unrestricted set of bean types contains the field type, all interfaces it extends directly or indirectly and java.lang.Object.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testApiTypeForInterfaceReturn()fisheye|svn

The bean types of a producer field depend upon the field type. If a field type is primitive or is a Java array type, the unrestricted set of bean types contains exactly two types: the field type and java.lang.Object.

ba)

Check primitive type

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testApiTypeForPrimitiveReturn()fisheye|svn
bb)

Check array type

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testApiTypeForArrayTypeReturn()fisheye|svn
c)

The bean types of a producer field depend upon the field type. If the field type is a class, the unrestricted set of bean types contains the field type, every superclass and all interfaces it implements directly or indirectly

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testApiTypeForClassReturn()fisheye|svn

Section 3.4.2 - Declaring a producer field

a)

A producer field may be declared by annotating a field with the @javax.enterprise.inject.Produces annotation.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testBeanDeclaresMultipleProducerFields()fisheye|svn
b)

A producer field may specify a scope.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testScopeType()fisheye|svn
c)

A producer field may specify a name.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testNamedField()fisheye|svn
e)

A producer field may specify stereotypes.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testStereotype()fisheye|svn
f)

A producer field may specify qualifiers.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testBindingType()fisheye|svn
g)

If a producer field is annotated @Inject, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition.broken.inject
InjectAnnotatedProducerFieldTest.testInjectAnnotatedProducerFieldNotAllowed()fisheye|svn
h)

If a non-static field of a session bean class is annotated @Produces, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition.broken.enterprise.nonstatic
NonStaticFieldOfSessionBeanTest.testNonStaticFieldOfSessionBeanCannotBeProducerField()fisheye|svn
ia)

Interceptors and decorators may not declare producer fields. If an interceptor or decorator has a field annotated @Produces, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition.broken.interceptor
ProducerFieldOnInterceptorTest.testProducerFieldNotAllowedOnInterceptor()fisheye|svn
ib)

Interceptors and decorators may not declare producer fields. If an interceptor or decorator has a field annotated @Produces, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition.broken.decorator
ProducerFieldOnDecoratorTest.testProducerFieldNotAllowedOnDecorator()fisheye|svn

Section 3.4.3 - Default name for a producer field

a)

The default name for a producer field is the field name

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testDefaultNamedField()fisheye|svn

Section 3.5 - Disposer methods

aa)

A disposer method must be a non-abstract method of a managed bean class or session bean class.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition
DisposalMethodDefinitionTest.testDisposalMethodOnNonBean()fisheye|svn
b)

A disposer method may be static.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testStaticDisposerMethod()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.disposal.method.definition
DisposalMethodDefinitionTest.testBindingTypesAppliedToDisposalMethodParameters()fisheye|svn
c)

A disposer method may be non-static.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition
DisposalMethodDefinitionTest.testBindingTypesAppliedToDisposalMethodParameters()fisheye|svn
d)

If the bean is a session bean, the disposer method must be a business method of the EJB or a static method of the bean class.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.methodOnSessionBean
DisposalMethodOnSessionBeanTest.testDisposalMethodNotBusinessOrStatic()fisheye|svn
e)

A bean may declare multiple disposer methods.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition
DisposalMethodDefinitionTest.testBindingTypesAppliedToDisposalMethodParameters()fisheye|svn

Section 3.5.1 - Disposed parameter of a disposer method

a)

Each disposer method must have exactly one disposed parameter, of the same type as the corresponding producer method return type or producer field type.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.multiParams
MultipleDisposeParametersDefinitionTest.testMultipleDisposeParameters()fisheye|svn
ba)

When searching for disposer methods for a producer method or producer field the container considers the type and qualifiers of the disposed parameter. f a producer method or producer field declared by the same bean class is assignable to the disposed parameter, according to the rules of typesafe resolution defined in Section 5.2, "Typesafe resolution", the container must call this method when destroying any instance returned by that producer method or producer field.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition
DisposalMethodDefinitionTest.testBindingTypesAppliedToDisposalMethodParameters()fisheye|svn
DisposalMethodDefinitionTest.testDisposalMethodOnNonBean()fisheye|svn
da)

A disposer method may resolve to multiple producer methods or producer fields declared by the bean class, in which case the container must call it when destroying any instance returned by any of these producer methods or producer fields.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition
DisposalMethodDefinitionTest.testDisposalMethodForMultipleProducerMethods()fisheye|svn

Section 3.5.2 - Declaring a disposer method

a)

A disposer method may be declared by annotating a parameter @javax.enterprise.inject.Disposes. That parameter is the disposed parameter

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition
DisposalMethodDefinitionTest.testBindingTypesAppliedToDisposalMethodParameters()fisheye|svn
b0)

Qualifiers may be declared by annotating the disposed parameter.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition
DisposalMethodDefinitionTest.testBindingTypesAppliedToDisposalMethodParameters()fisheye|svn
ba)

If a method has more than one parameter annotated @Disposes, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.multiParams
MultipleDisposeParametersDefinitionTest.testMultipleDisposeParameters()fisheye|svn
ca)

If a disposer method is annotated @Produces, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.producesUnallowed
ProducesUnallowedDefinitionTest.testProducesUnallowed()fisheye|svn
da)

If a disposer method is annotated @Inject, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.initializerUnallowed
InitializerUnallowedDefinitionTest.testInitializerUnallowed()fisheye|svn
ea)

If a disposer method has a parameter annotated @Observes, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.observesUnallowed
ObserverParameterUnallowedDefinitionTest.testObserverParameterUnallowed()fisheye|svn
fa)

If a non-static method of a session bean class has a parameter annotated @Disposes, and the method is not a business method of the session bean, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.methodOnSessionBean
DisposalMethodOnSessionBeanTest.testDisposalMethodNotBusinessOrStatic()fisheye|svn
ga)

Interceptors and decorators may not declare disposer methods. If an interceptor or decorator has a method annotated @Disposes, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.interceptor
DisposerMethodOnInterceptorTest.testDisposerMethodNotAllowedOnInterceptor()fisheye|svn
gb)

Interceptors and decorators may not declare disposer methods. If an interceptor or decorator has a method annotated @Disposes, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.decorator
DisposerMethodOnDecoratorTest.testDisposerMethodNotAllowedOnDecorator()fisheye|svn
h)

In addition to the disposed parameter, a disposer method may declare additional parameters, which may also specify qualifiers. These additional parameters are injection points.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition
DisposalMethodDefinitionTest.testDisposalMethodParametersGetInjected()fisheye|svn

Section 3.5.3 - Disposer method resolution

aa)

A disposer method is bound to a producer method if the producer method is declared by the same bean class as the disposer method, and the producer method is assignable to the disposed parameter, according to the rules of typesafe resolution defined in Section 5.2, "Typesafe resolution".

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition
DisposalMethodDefinitionTest.testBindingTypesAppliedToDisposalMethodParameters()fisheye|svn
ab)

A disposer method is bound to a producer field if the producer field is declared by the same bean class as the disposer method, and the producer field is assignable to the disposed parameter, according to the rules of typesafe resolution defined in Section 5.2, "Typesafe resolution".

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition
DisposalMethodDefinitionTest.testDisposalMethodCalledForProducerField()fisheye|svn
ba)

If there are multiple disposer methods for a single producer method or producer field, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.multipleDisposersForProducer
MultipleDisposerMethodsForProducerMethodTest.testMultipleDisposerMethodsForProducerMethodNotAllowed()fisheye|svn
ca)

If there is no producer method or producer field declared by the bean class that is assignable to the disposed parameter of a disposer method, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.unresolvedMethod
UnresolvedDisposalMethodDefinitionTest.testUnresolvedDisposalMethod()fisheye|svn

Section 3.6 - Resources

ka)

The container is not required to support resources with scope other than @Dependent.

l)

A resource may not declare a bean EL name

Section 3.6.1 - Declaring a resource

aa)

A resource may be declared by specifying a Java EE component environment injection annotation as part of a producer field declaration.

bb)

For a Java EE resource, @Resource must be specified.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.resource
InjectionOfResourceTest.testInjectionOfResource()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.simple.resource.env
EnvInjectionTest.testInjectionOfEnv()fisheye|svn
cc)

For a persistence context, @PersistenceContext must be specified.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext
PersistenceContextInjectionTest.testInjectionOfPersistenceContext()fisheye|svn
dd)

For a persistence unit, @PersistenceUnit must be specified.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext
PersistenceContextInjectionTest.testInjectionOfPersistenceUnit()fisheye|svn
ee)

For a remote EJB, @EJB must be specified.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb
EjbInjectionTest.testInjectionOfEjbs()fisheye|svn
ff)

For a web service, @WebServiceRef must be specified.

Coverage

No tests exist for this assertion

gg)

The injection annotation specifies the metadata needed to obtain the resources, entity manager, entity manager factory, remote EJB instance or web service reference from the component environment.

hh)

The bean type and qualifiers of the resource are determined by the producer field declaration.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext
PersistenceContextInjectionTest.testBeanTypesAndBindingTypesOfPersistenceContext()fisheye|svn
i)

If the producer field declaration specifies an EL name, the container automatically detects the problem and treats it as a definition error.

Coverage

No tests exist for this assertion

j)

If the matching object in the Java EE component environment is not of the same type as the producer field declaration, the container automatically detects the problem and treats it as a definition errors.

Coverage

No tests exist for this assertion

Section 3.6.2 - Bean types of a resource

The unrestricted set of bean types of a resource is determined by the declared type of the producer field, as specified by Section 3.4.1, “Bean types of a producer field”.

aa)

Check @Resource

Coverage

No tests exist for this assertion

ab)

Check @PersistenceContext

Coverage

No tests exist for this assertion

ac)

Check @PersistenceUnit

Coverage

No tests exist for this assertion

ad)

Check @EJB

Coverage

No tests exist for this assertion

ae)

Check @WebServiceRef

Coverage

No tests exist for this assertion

Section 3.7 - Additional built-in beans

a)

A Java EE or embeddable EJB container must provide a bean with qualifier @Default and bean type javax.transaction.UserTransaction, allowing injection of a reference to the JTA UserTransaction.

Coverage

org.jboss.jsr299.tck.tests.implementation.builtin
BuiltInBeansTest.testUserTransactionBean()fisheye|svn
b)

A Java EE or embeddable EJB container must provide a bean with qualifier @Default and bean type javax.security.Principal, allowing injection of a Principal representing the current caller identity.

Coverage

org.jboss.jsr299.tck.tests.implementation.builtin
BuiltInBeansTest.testPrincipalBean()fisheye|svn
c)

A Java EE or embeddable EJB container must provide a bean with qualifier @Default and bean type javax.validation.ValidatorFactory, allowing injection of the default Bean Validation ValidatorFactory.

Coverage

org.jboss.jsr299.tck.tests.implementation.builtin
BuiltInBeansTest.testDefaultValidatorFactoryBean()fisheye|svn
d)

A Java EE or embeddable EJB container must provide a bean with qualifier @Default and bean type javax.validation.Validator, allowing injection of a Validator for the default Bean Validation ValidatorFactory.

Coverage

org.jboss.jsr299.tck.tests.implementation.builtin
BuiltInBeansTest.testDefaultValidatorBean()fisheye|svn
da)

A servlet container must provide a bean with qualifier @Default and bean type javax.servlet.http.HttpServletRequest, allowing injection of a reference to the HttpServletRequest. This bean is passivation capable dependency, as defined in Section 6.6.2, "Passivation capable dependencies".

Coverage

org.jboss.jsr299.tck.tests.implementation.builtin.servlet
ServletContainerBuiltinBeanTest.testBuiltinBeansAvailableForInjection()fisheye|svn
ServletContainerBuiltinBeanTest.testBuiltinBeansFromClient()fisheye|svn
db)

A servlet container must provide a bean with qualifier @Default and bean type javax.servlet.http.HttpSession, allowing injection of a reference to the HttpSession. This bean is passivation capable dependency, as defined in Section 6.6.2, "Passivation capable dependencies".

Coverage

org.jboss.jsr299.tck.tests.implementation.builtin.servlet
ServletContainerBuiltinBeanTest.testBuiltinBeansAvailableForInjection()fisheye|svn
ServletContainerBuiltinBeanTest.testBuiltinBeansFromClient()fisheye|svn
dc)

A servlet container must provide a bean with qualifier @Default and bean type javax.servlet.ServletContext, allowing injection of a reference to the ServletContext. This bean is passivation capable dependency, as defined in Section 6.6.2, "Passivation capable dependencies".

Coverage

org.jboss.jsr299.tck.tests.implementation.builtin.servlet
ServletContainerBuiltinBeanTest.testBuiltinBeansAvailableForInjection()fisheye|svn
ServletContainerBuiltinBeanTest.testBuiltinBeansFromClient()fisheye|svn
e)

If a Java EE component class has an injection point of type UserTransaction and qualifier @Default, and may not validly make use of the JTA UserTransaction according to the Java EE platform specification, the container automatically detects the problem and treats it as a definition error.

Coverage

No tests exist for this assertion

Section 3.8 - Bean constructors

a)

When the container instantiates a bean, it calls the bean constructor. The bean constructor is a constructor of the bean class

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition
SimpleBeanDefinitionTest.testEmptyConstructorUsed()fisheye|svn

Section 3.8.1 - Declaring a bean constructor

The bean constructor may be identified by annotating the constructor @Inject

aa)

Test an @Inject constructor is used on a managed bean

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition
SimpleBeanDefinitionTest.testInitializerAnnotatedConstructor()fisheye|svn
SimpleBeanDefinitionTest.testInitializerAnnotatedConstructorUsedOverEmptyConstuctor()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testCreateInjectsFieldsDeclaredInJava()fisheye|svn
ab)

Test an @Inject constructor is used on a session bean

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testConstructorAnnotatedInjectCalled()fisheye|svn
ba)

If a bean class does not explicitly declare a constructor using @Inject, the constructor that accepts no parameters is the bean constructor.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition
SimpleBeanDefinitionTest.testEmptyConstructorUsed()fisheye|svn
ca)

If a bean class has more than one constructor annotated @Inject, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition.tooManyInitializerAnnotatedConstructors
TooManyInitializerAnnotatedConstructorsTest.testTooManyInitializerAnnotatedConstructor()fisheye|svn
da)

If a bean constructor has a parameter annotated @Disposes, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition.constructorHasDisposesParameter
ConstructorHasDisposesParameterTest.testConstructorHasDisposesParameter()fisheye|svn
ea)

If a bean constructor has a parameter annotated @Observes, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition.constructorHasObservesParameter
ConstructorHasObservesParameterTest.testConstructorHasObservesParameter()fisheye|svn
f)

A bean constructor may have any number of parameters.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testInjectionOfParametersIntoBeanConstructor()fisheye|svn
g)

All parameters of a bean constructor are injection points.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testQualifierTypeAnnotatedConstructor()fisheye|svn
SimpleBeanLifecycleTest.testInjectionOfParametersIntoBeanConstructor()fisheye|svn

Section 3.9 - Injected fields

An injected field is a non-static, non-final field of a bean class, a non-static, non-final field of an enum, or of any Java EE component class supporting injection.

a)

Test a bean class.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testCreateInjectsFieldsDeclaredInJava()fisheye|svn
b)

Test a Java EE component class.

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoServlet()fisheye|svn
InjectionIntoNonContextualComponentTest.testInjectionIntoFilter()fisheye|svn
InjectionIntoNonContextualComponentTest.testInjectionIntoServletListener()fisheye|svn
InjectionIntoNonContextualComponentTest.testInjectionIntoTagHandler()fisheye|svn
InjectionIntoNonContextualComponentTest.testInjectionIntoTagLibraryListener()fisheye|svn
InjectionIntoNonContextualComponentTest.testInjectionIntoJSFManagedBean()fisheye|svn
c)

Test an enum.

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enums
EnumInjectionTest.testBasicEnum()fisheye|svn
EnumInjectionTest.testAdvancedEnum()fisheye|svn

Section 3.9.1 - Declaring an injected field

aa)

An injected field may be declared by annotating the field @javax.inject.Inject.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testCreateInjectsFieldsDeclaredInJava()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.injection.enums
EnumInjectionTest.testBasicEnum()fisheye|svn
b)

If an injected field is annotated @Produces, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition.broken.field
InjectedFieldAnnotatedWithProducesTest.testDeployment()fisheye|svn

Section 3.10 - Initializer methods

An initializer method is a non-abstract, non-static, non-generic method of a bean class, a non-abstract, non-static method of an enum or of any Java EE component class supporting injection.

a)

Test a bean-class.

Coverage

org.jboss.jsr299.tck.tests.implementation.initializer
InitializerMethodTest.testBindingTypeOnInitializerParameter()fisheye|svn
b)

Test a Java EE component class.

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testServletInitializerMethodCalled()fisheye|svn
InjectionIntoNonContextualComponentTest.testFilterInitializerMethodCalled()fisheye|svn
InjectionIntoNonContextualComponentTest.testServletListenerInitializerMethodCalled()fisheye|svn
InjectionIntoNonContextualComponentTest.testTagLibraryListenerInitializerMethodCalled()fisheye|svn
c)

Test an enum.

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enums
EnumInjectionTest.testBasicEnum()fisheye|svn
EnumInjectionTest.testAdvancedEnum()fisheye|svn
e)

If the bean is a session bean, the initializer method is not required to be a business method of the session bean.

Coverage

org.jboss.jsr299.tck.tests.implementation.initializer
EjbInitializerMethodTest.testInitializerMethodNotABusinessMethod()fisheye|svn
f)

Method interceptors are never called when the container calls an initializer method

Coverage

org.jboss.jsr299.tck.tests.interceptors.invocation
InterceptorInvocationTest.testInitializerMethodsNotIntercepted()fisheye|svn
g)

A bean class may declare multiple (or zero) initializer methods

Coverage

org.jboss.jsr299.tck.tests.implementation.initializer
InitializerMethodTest.testMultipleInitializerMethodsAreCalled()fisheye|svn
h)

The application may call initializer methods directly, but then no parameters will be passed to the method by the container

Section 3.10.1 - Declaring an initializer method

a)

An initializer method may be declared by annotating the method @javax.inject.Inject

Coverage

org.jboss.jsr299.tck.tests.implementation.initializer
InitializerMethodTest.testMultipleInitializerMethodsAreCalled()fisheye|svn
ab)

If a generic method of a bean is annotated @Inject, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.initializer.broken.generic
GenericInitializerMethodTest.testGenericInitializerMethodNotAllowed()fisheye|svn
ba)

If an initializer method is annotated @Produces, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.initializer.broken.methodAnnotatedProduces
InitializerMethodAnnotatedProducesTest.testInitializerMethodAnnotatedProduces()fisheye|svn
ca)

If an initializer method has a parameter annotated @Disposes, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.initializer.broken.parameterAnnotatedDisposes
ParameterAnnotatedDisposesTest.testInitializerMethodHasParameterAnnotatedDisposes()fisheye|svn
da)

If an initializer method has a parameter annotated @Observes, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.implementation.initializer.broken.parameterAnnotatedObserves
ParameterAnnotatedObservesTest.testInitializerMethodHasParameterAnnotatedObserves()fisheye|svn
e)

An initializer method may have any number of parameters.

Coverage

org.jboss.jsr299.tck.tests.implementation.initializer
InitializerMethodTest.testMultipleInitializerMethodsAreCalled()fisheye|svn
f)

All initializer method parameters are injection points.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle
EnterpriseBeanLifecycleTest.testInitializerMethodsCalledWithCurrentParameterValues()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.initializer
InitializerMethodTest.testBindingTypeOnInitializerParameter()fisheye|svn

Section 3.11 - The default qualifier at injection points

a)

If an injection point declares no qualifier, the injection point has exactly one qualifier, the default qualifier @Default.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition
DisposalMethodDefinitionTest.testDisposalMethodParametersGetInjected()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.initializer
InitializerMethodTest.testMultipleInitializerMethodsAreCalled()fisheye|svn
org.jboss.jsr299.tck.tests.event
EventTest.testObserverMethodReceivesInjectionsOnNonObservesParameters()fisheye|svn

Section 3.12 - Vetoing beans

a)

Any class or package may be prevented from providing bean definitions by adding the @Veto annotation on the class or package.

Coverage

org.jboss.jsr299.tck.tests.veto
VetoTest.testClassLevelVeto()fisheye|svn
VetoTest.testPackageLevelVeto()fisheye|svn
VetoTest.testReplacingAnnotatedTypeWithExtension()fisheye|svn
b)

Any class or package may be prevented from providing bean definitions based on the availability of other classes by adding the @Requires annotation on the class or package.

Coverage

org.jboss.jsr299.tck.tests.veto
VetoTest.testClassLevelRequirements()fisheye|svn
VetoTest.testPackageLevelRequirements()fisheye|svn
VetoTest.testReplacingAnnotatedTypeWithExtension()fisheye|svn

Section 3.13 - The qualifier @Named at injection points

a)

If an injected field declares a @Named annotation that does not specify the value member, the name of the field is assumed.

Coverage

org.jboss.jsr299.tck.tests.lookup.byname
ResolutionByNameTest.testFieldNameUsedAsBeanName()fisheye|svn
b)

If any other injection point declares a @Named annotation that does not specify the value member, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.lookup.byname.broken.injectionPointWithNamed
NamedNonFieldInjectionPointTest.testNamedProducerInjectionPointNotAllowed()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.byname.broken.injectionPointWithNamed2
NamedNonFieldInjectionPointTest.testNamedObserverMethodInjectionPointNotAllowed()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.byname.broken.injectionPointWithNamed3
NamedNonFieldInjectionPointTest.testNamedInitializerMethodInjectionPointNotAllowed()fisheye|svn

Section 3.14 - @New qualified beans

d)

For each managed bean, a second bean exists which has the same bean class.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testForEachSimpleBeanANewBeanExists()fisheye|svn
e)

For each managed bean, a second bean exists which has the same bean types.

Coverage

No tests exist for this assertion

f)

For each managed bean, a second bean exists which has the same bean constructor.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testNewBeanHasSameConstructor()fisheye|svn
g)

For each managed bean, a second bean exists which has the same initializer methods.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testNewBeanHasSameInitializers()fisheye|svn
h)

For each managed bean, a second bean exists which has the same injected fields.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testNewBeanHasSameInjectedFields()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.enterprise.newBean
NewEnterpriseBeanTest.testNewBeanHasSameInjectedFields()fisheye|svn
i)

For each managed bean, a second bean exists which has the same interceptor bindings.

Coverage

No tests exist for this assertion

j)

For each session bean, a second bean exists which has the same bean class.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.newBean
NewEnterpriseBeanTest.testForEachEnterpriseBeanANewBeanExists()fisheye|svn
k)

For each session bean, a second bean exists which has the same bean types.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.newBean
NewEnterpriseBeanTest.testForEachEnterpriseBeanANewBeanExists()fisheye|svn
l)

For each session bean, a second bean exists which has the same bean constructor.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.newBean
NewEnterpriseBeanICTest.testNewBeanHasSameConstructor()fisheye|svn
m)

For each session bean, a second bean exists which has the same initializer methods.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.newBean
NewEnterpriseBeanICTest.testNewBeanHasSameInitializers()fisheye|svn
n)

For each session bean, a second bean exists which has the same injected fields.

Coverage

No tests exist for this assertion

o)

For each session bean, a second bean exists which has the same interceptor bindings.

Coverage

No tests exist for this assertion

p)

This second bean has scope @Dependent.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.newBean
NewEnterpriseBeanTest.testNewBeanIsDependentScoped()fisheye|svn
r)

This second bean has exactly one qualifier: @javax.enterprise.inject.New(X.class) where x is the bean class.

A test exists for this untestable assertion!
s)

This second bean has no bean EL name.

A test exists for this untestable assertion!
t)

This second bean has no stereotypes.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testNewBeanHasNoStereotypes()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.enterprise.newBean
NewEnterpriseBeanTest.testNewBeanHasNoStereotypes()fisheye|svn
u)

This second bean has no observer methods.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testNewBeanHasNoObservers()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.enterprise.newBean
NewEnterpriseBeanTest.testNewBeanHasNoObservers()fisheye|svn
v)

This second bean has no producer methods.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.newBean
NewEnterpriseBeanICTest.testNewBeanHasNoProducerMethods()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testNewBeanHasNoProducerMethods()fisheye|svn
w)

This second bean has no producer fields.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testNewBeanHasNoProducerFields()fisheye|svn
x)

This second bean has no disposer methods.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.newBean
NewEnterpriseBeanICTest.testNewBeanHasNoDisposalMethods()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testNewBeanHasNoDisposerMethods()fisheye|svn
xb)

This second bean is not an alternative.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testNewBeanIsNotAlternative()fisheye|svn
xc)

This second bean is enabled, in the sense of Section 5.1.2, "Enabled and disabled beans", if and only if some other enabled bean has an injection point with the qualifier @New(X.class) where X is the bean class.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testNewBeanNotEnabledWithouInjectionPoint()fisheye|svn
xd)

This bean is called the @New qualified bean for the class X.

Note that this second bean exists, and may be enabled and available for injection even if the first bean is disabled, as defined by Section 5.1.2, “Enabled and disabled beans” or if the bean class is deployed outside of a bean deployment archive, as defined in Section 12.1, “Bean deployment archives”, and is therefore not discovered during the bean discovery process defined in Chapter 12, Packaging and deployment. The container discovers @New qualified beans by inspecting injection points of other enabled beans.

ya)

Check that @New on a field injection point outside the BDA, but in the classpath causes a bean with qualifier @New and the given type to be created

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testNewBeanCreatedForFieldInjectionPoint()fisheye|svn
yb)

Check that @New on a field injection point (which is a session bean class) outside the BDA, but in the classpath causes a session bean with qualifier @New and the given type to be created

Coverage

No tests exist for this assertion

yc)

Check that @New on a initializer method injection point outside the BDA, but in the classpath causes a bean with qualifier @New and the given type to be created

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testNewBeanCreatedForInitializerInjectionPoint()fisheye|svn
yd)

Check that @New on a initializer method injection point (which is a session bean class) outside the BDA, but in the classpath causes a session bean with qualifier @New and the given type to be created

Coverage

No tests exist for this assertion

ye)

Check that @New on a constructor injection point outside the BDA, but in the classpath causes a bean with qualifier @New and the given type to be created

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testNewBeanCreatedForConstructorInjectioAnPoint()fisheye|svn
yf)

Check that @New on a constructor injection point (which is a session bean class) outside the BDA, but in the classpath causes a session bean with qualifier @New and the given type to be created

Coverage

No tests exist for this assertion

yg)

Check that @New on a producer method injection point outside the BDA, but in the classpath causes a bean with qualifier @New and the given type to be created

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testNewBeanCreatedForProducerMethod()fisheye|svn
yh)

Check that @New on a producer method injection point (which is a session bean class) outside the BDA, but in the classpath causes a session bean with qualifier @New and the given type to be created

Coverage

No tests exist for this assertion

yi)

Check that @New on a observer method injection point outside the BDA, but in the classpath causes a bean with qualifier @New and the given type to be created

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testNewBeanCreatedForObserverMethod()fisheye|svn
yj)

Check that @New on a observer method injection point (which is a session bean class) outside the BDA, but in the classpath causes a session bean with qualifier @New and the given type to be created

Coverage

No tests exist for this assertion

yk)

Check that @New on a disposer method injection point outside the BDA, but in the classpath causes a bean with qualifier @New and the given type to be created

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testNewBeanCreatedForDisposerMethod()fisheye|svn
yl)

Check that @New on a disposer method injection point (which is a session bean class) outside the BDA, but in the classpath causes a session bean with qualifier @New and the given type to be created

Coverage

No tests exist for this assertion

z)

When the qualifier @New is specified at an injection point and no value member is explicitly specified, the container defaults the value to the declared type of the injection point.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean
NewSimpleBeanTest.testNewBeanWithNoMemberValue()fisheye|svn

Section 4.1 - Inheritance of type-level metadata

Suppose a class X is extended directly or indirectly by the bean class of a managed bean or session bean Y. If X is annotated with a qualifier type, stereotype or interceptor binding type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.

aa)

Test qualifier type for directly extended managed bean annotated @Inherited is inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.qualifier
QualifierDefinitionTest.testQualifierDeclaredInheritedIsInherited()fisheye|svn
QualifierDefinitionTest.testQualifierDeclaredInheritedIsBlockedByIntermediateClass()fisheye|svn
aaa)

Test qualifier type for directly extended managed bean not annotated @Inherited is not inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.qualifier
QualifierDefinitionTest.testQualifierNotDeclaredInheritedIsNotInherited()fisheye|svn
ab)

Test stereotype for directly extended managed bean annotated @Inherited is inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype
StereotypeDefinitionTest.testStereotypeDeclaredInheritedIsInherited()fisheye|svn
org.jboss.jsr299.tck.tests.definition.scope
ScopeDefinitionTest.testWebBeanScopeTypeOverridesStereotype()fisheye|svn
aba)

Test stereotype for directly extended managed bean not annotated @Inherited is not inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype
StereotypeDefinitionTest.testStereotypeNotDeclaredInheritedIsNotInherited()fisheye|svn
ad)

Test interceptor binding type for directly extended managed bean annotated @Inherited is inherited.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.inheritance
InterceptorBindingInheritanceTest.testInterceptorBindingDirectlyInheritedFromManagedBean()fisheye|svn
ada)

Test interceptor binding type for directly extended managed bean not annotated @Inherited is not inherited.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.inheritance
InterceptorBindingInheritanceTest.testInterceptorBindingDirectlyInheritedFromManagedBean()fisheye|svn
ag)

Test qualifier type for indirectly extended managed bean annotated @Inherited is inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.qualifier
QualifierDefinitionTest.testQualifierDeclaredInheritedIsIndirectlyInherited()fisheye|svn
aga)

Test qualifier type for indirectly extended managed bean not annotated @Inherited is not inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.qualifier
QualifierDefinitionTest.testQualifierNotDeclaredInheritedIsNotIndirectlyInherited()fisheye|svn
ah)

Test stereotype for indirectly extended managed bean annotated @Inherited is inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype
StereotypeDefinitionTest.testStereotypeDeclaredInheritedIsIndirectlyInherited()fisheye|svn
aha)

Test stereotype for indirectly extended managed bean not annotated @Inherited is not inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype
StereotypeDefinitionTest.testStereotypeNotDeclaredInheritedIsNotIndirectlyInherited()fisheye|svn
aj)

Test interceptor binding type for indirectly extended managed bean annotated @Inherited is inherited.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.inheritance
InterceptorBindingInheritanceTest.testInterceptorBindingIndirectlyInheritedFromManagedBean()fisheye|svn
aja)

Test interceptor binding type for indirectly extended managed bean not annotated @Inherited is not inherited.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.inheritance
InterceptorBindingInheritanceTest.testInterceptorBindingIndirectlyInheritedFromManagedBean()fisheye|svn
al)

Test qualifier type for directly extended session bean annotated @Inherited is inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.qualifier.enterprise
EnterpriseQualifierDefinitionTest.testQualifierDeclaredInheritedIsInherited()fisheye|svn
ala)

Test qualifier type for directly extended session bean not annotated @Inherited is not inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.qualifier.enterprise
EnterpriseQualifierDefinitionTest.testQualifierNotDeclaredInheritedIsNotInherited()fisheye|svn
am)

Test stereotype for directly extended session bean annotated @Inherited is inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype.enterprise
EnterpriseStereotypeDefinitionTest.testStereotypeDeclaredInheritedIsInherited()fisheye|svn
ama)

Test stereotype for directly extended session bean not annotated @Inherited is not inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype.enterprise
EnterpriseStereotypeDefinitionTest.testStereotypeNotDeclaredInheritedIsNotInherited()fisheye|svn
an)

Test interceptor binding type for directly extended session bean annotated @Inherited is inherited.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.inheritance
InterceptorBindingInheritanceTest.testInterceptorBindingDirectlyInheritedFromSessionBean()fisheye|svn
ana)

Test interceptor binding type for directly extended session bean not annotated @Inherited is not inherited.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.inheritance
InterceptorBindingInheritanceTest.testInterceptorBindingDirectlyInheritedFromSessionBean()fisheye|svn
ap)

Test qualifier type for indirectly extended session bean annotated @Inherited is inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.qualifier.enterprise
EnterpriseQualifierDefinitionTest.testQualifierDeclaredInheritedIsIndirectlyInherited()fisheye|svn
apa)

Test qualifier type for indirectly extended session bean not annotated @Inherited is not inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.qualifier.enterprise
EnterpriseQualifierDefinitionTest.testQualifierNotDeclaredInheritedIsNotIndirectlyInherited()fisheye|svn
aq)

Test stereotype for indirectly extended session bean annotated @Inherited is inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype.enterprise
EnterpriseStereotypeDefinitionTest.testStereotypeDeclaredInheritedIsIndirectlyInherited()fisheye|svn
aqa)

Test stereotype for indirectly extended session bean not annotated @Inherited is not inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype.enterprise
EnterpriseStereotypeDefinitionTest.testStereotypeNotDeclaredInheritedIsNotIndirectlyInherited()fisheye|svn
ar)

Test interceptor binding type for indirectly extended session bean annotated @Inherited is inherited.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.inheritance
InterceptorBindingInheritanceTest.testInterceptorBindingIndirectlyInheritedFromSessionBean()fisheye|svn
ara)

Test interceptor binding type for indirectly extended session bean not annotated @Inherited is not inherited.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.inheritance
InterceptorBindingInheritanceTest.testInterceptorBindingIndirectlyInheritedFromSessionBean()fisheye|svn

Suppose a class X is extended directly or indirectly by the bean class of a managed bean or session bean Y. If X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.

ba)

Test scope type for directly extended managed bean annotated @Inherited is inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.scope
ScopeDefinitionTest.testScopeTypeDeclaredInheritedIsInherited()fisheye|svn
ScopeDefinitionTest.testScopeTypeDeclaredInheritedIsBlockedByIntermediateScopeTypeMarkedInherited()fisheye|svn
ScopeDefinitionTest.testScopeTypeDeclaredInheritedIsBlockedByIntermediateScopeTypeNotMarkedInherited()fisheye|svn
baa)

Test scope type for directly extended managed bean not annotated @Inherited is not inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.scope
ScopeDefinitionTest.testScopeTypeNotDeclaredInheritedIsNotInherited()fisheye|svn
bc)

Test scope type for indirectly extended managed bean annotated @Inherited is inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.scope
ScopeDefinitionTest.testScopeTypeDeclaredInheritedIsIndirectlyInherited()fisheye|svn
bca)

Test scope type for indirectly extended managed bean not annotated @Inherited is not inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.scope
ScopeDefinitionTest.testScopeTypeNotDeclaredInheritedIsNotIndirectlyInherited()fisheye|svn
be)

Test scope type for directly extended session bean annotated @Inherited is inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.scope.enterprise
EnterpriseScopeDefinitionTest.testScopeTypeDeclaredInheritedIsInherited()fisheye|svn
bea)

Test scope type for directly extended session bean not annotated @Inherited is not inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.scope.enterprise
EnterpriseScopeDefinitionTest.testScopeTypeNotDeclaredInheritedIsNotInherited()fisheye|svn
bh)

Test scope type for indirectly extended session bean annotated @Inherited is inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.scope.enterprise
EnterpriseScopeDefinitionTest.testScopeTypeDeclaredInheritedIsIndirectlyInherited()fisheye|svn
bha)

Test scope type for indirectly extended session bean not annotated @Inherited is not inherited.

Coverage

org.jboss.jsr299.tck.tests.definition.scope.enterprise
EnterpriseScopeDefinitionTest.testScopeTypeNotDeclaredInheritedIsNotIndirectlyInherited()fisheye|svn
hhh)

For class X which is extended directly by the bean class of a managed bean Y, a scope type explicitly declared by X and inherited by Y from X takes precedence over default scopes of stereotypes declared or inherited by Y.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype
StereotypeDefinitionTest.testStereotypeScopeIsOverriddenByInheritedScope()fisheye|svn
hhi)

For class X which is extended indirectly by the bean class of a managed bean Y, a scope type explicitly declared by X and inherited by Y from X takes precedence over default scopes of stereotypes declared or inherited by Y.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype
StereotypeDefinitionTest.testStereotypeScopeIsOverriddenByIndirectlyInheritedScope()fisheye|svn
hhj)

For class X which is extended directly by the bean class of a session bean Y, a scope type explicitly declared by X and inherited by Y from X takes precedence over default scopes of stereotypes declared or inherited by Y.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype.enterprise
EnterpriseStereotypeDefinitionTest.testStereotypeScopeIsOverriddenByInheritedScope()fisheye|svn
hhk)

For class X which is extended indirectly by the bean class of a session bean Y, a scope type explicitly declared by X and inherited by Y from X takes precedence over default scopes of stereotypes declared or inherited by Y.

Coverage

org.jboss.jsr299.tck.tests.definition.stereotype.enterprise
EnterpriseStereotypeDefinitionTest.testStereotypeScopeIsOverriddenByIndirectlyInheritedScope()fisheye|svn
i)

For annotations defined by the bean specification, all built-in scope types are declared @Inherited

j)

For annotations defined by the bean specification, all built-in stereotypes are declared @Inherited

k)

For annotations defined by the bean specification, no built-in qualifier type is declared @Inherited

m)

The @Named annotation is not declared @Inherited and bean EL names are not inherited unless specialization is used

Section 4.2 - Inheritance of member-level metadata

Suppose a class X is extended directly or indirectly by the bean class of a managed bean or session bean Y. If X declares an injected field x then Y inherits x.

aa)

Check managed bean X directly extends managed bean Y

Coverage

org.jboss.jsr299.tck.tests.lookup.injection
InjectionTest.testFieldDeclaredInSuperclassInjected()fisheye|svn
ac)

Check managed bean X indirectly extends managed bean Y

Coverage

org.jboss.jsr299.tck.tests.lookup.injection
InjectionTest.testFieldDeclaredInIndirectSuperclassInjected()fisheye|svn
ab)

Check session bean X directly extends session bean Y

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionTest.testFieldDeclaredInSuperclassInjected()fisheye|svn
ad)

Check session bean X indirectly extends session bean Y

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionTest.testFieldDeclaredInSuperclassIndirectlyInjected()fisheye|svn

Suppose a class X is extended directly or indirectly by the bean class of a managed bean or session bean Y. If X declares an initializer, non-static observer, @PostConstruct or @PreDestroy method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x().

baa)

Check managed bean X directly extends managed bean Y with @PostConstruct

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testSubClassInheritsPostConstructOnSuperclass()fisheye|svn
SimpleBeanLifecycleTest.testSubClassDoesNotInheritPostConstructOnSuperclassBlockedByIntermediateClass()fisheye|svn
bab)

Check session bean X directly extends session bean Y with @PostConstruct

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle
EnterpriseBeanLifecycleTest.testDirectSubClassInheritsPostConstructOnSuperclass()fisheye|svn
bac)

Check managed bean X indirectly extends managed bean Y with @PostConstruct

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testIndirectSubClassInheritsPostConstructOnSuperclass()fisheye|svn
bad)

Check session bean X indirectly extends session bean Y with @PostConstruct

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle
EnterpriseBeanLifecycleTest.testIndirectSubClassInheritsPostConstructOnSuperclass()fisheye|svn
bba)

Check managed bean X directly extends managed bean Y with @PostDestroy

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testSubClassInheritsPreDestroyOnSuperclass()fisheye|svn
SimpleBeanLifecycleTest.testSubClassDoesNotInheritPreDestroyConstructOnSuperclassBlockedByIntermediateClass()fisheye|svn
bbb)

Check session bean X directly extends session bean Y with @PostDestroy

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle
EnterpriseBeanLifecycleTest.testSubClassInheritsPreDestroyOnSuperclass()fisheye|svn
bbc)

Check managed bean X indirectly extends managed bean Y with @PostDestroy

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testIndirectSubClassInheritsPreDestroyOnSuperclass()fisheye|svn
bbd)

Check session bean X indirectly extends session bean Y with @PostDestroy

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle
EnterpriseBeanLifecycleTest.testIndirectSubClassInheritsPreDestroyOnSuperclass()fisheye|svn
dc)

Check managed bean X directly extends managed bean Y with a non-static observer method

Coverage

org.jboss.jsr299.tck.tests.event
EventTest.testNonStaticObserverMethodInherited()fisheye|svn
df)

Check session bean X directly extends session bean Y with a non-static observer method

Coverage

org.jboss.jsr299.tck.tests.event.observer.enterprise
EnterpriseEventInheritenceTest.testNonStaticObserverMethodInherited()fisheye|svn
di)

Check managed bean X indirectly extends managed bean Y with a non-static observer method

Coverage

org.jboss.jsr299.tck.tests.event
EventTest.testNonStaticObserverMethodIndirectlyInherited()fisheye|svn
dl)

Check session bean X indirectly extends session bean Y with a non-static observer method

Coverage

org.jboss.jsr299.tck.tests.event.observer.enterprise
EnterpriseEventInheritenceTest.testNonStaticObserverMethodIndirectlyInherited()fisheye|svn
dm)

Check managed bean X directly extends managed bean Y with a initializer method

Coverage

org.jboss.jsr299.tck.tests.inheritance.initializer
InitializerMethodInheritanceTest.testManagedBeanDirectlyInheritsInitializer()fisheye|svn
dn)

Check session bean X directly extends session bean Y with a initializer method

Coverage

org.jboss.jsr299.tck.tests.inheritance.initializer
InitializerMethodInheritanceTest.testSessionBeanDirectlyInheritsInitializer()fisheye|svn
do)

Check managed bean X indirectly extends managed bean Y with a initializer method

Coverage

org.jboss.jsr299.tck.tests.inheritance.initializer
InitializerMethodInheritanceTest.testManagedBeanIndirectlyInheritsInitializer()fisheye|svn
dp)

Check session bean X indirectly extends session bean Y with a initializer method

Coverage

org.jboss.jsr299.tck.tests.inheritance.initializer
InitializerMethodInheritanceTest.testSessionBeanIndirectlyInheritsInitializer()fisheye|svn

Suppose a class X is extended directly or indirectly by the bean class of a managed bean or session bean Y. If X declares a non-static method x() annotated with an interceptor binding type Z then Y inherits the binding if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x().

ka)

Check managed bean X directly extends managed bean Y

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.inheritance
InterceptorBindingInheritanceTest.testMethodInterceptorBindingDirectlyInheritedFromManagedBean()fisheye|svn
InterceptorBindingInheritanceTest.testMethodInterceptorBindingDirectlyNotInherited()fisheye|svn
kb)

Check session bean X directly extends session bean Y

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.inheritance
InterceptorBindingInheritanceTest.testMethodInterceptorBindingDirectlyInheritedFromSessionBean()fisheye|svn
kc)

Check managed bean X indirectly extends managed bean Y

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.inheritance
InterceptorBindingInheritanceTest.testMethodInterceptorBindingIndirectlyInheritedFromManagedBean()fisheye|svn
InterceptorBindingInheritanceTest.testMethodInterceptorBindingIndirectlyNotInherited()fisheye|svn
kd)

Check session bean X indirectly extends session bean Y

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.inheritance
InterceptorBindingInheritanceTest.testMethodInterceptorBindingIndirectlyInheritedFromSessionBean()fisheye|svn

Suppose a class X is extended directly or indirectly by the bean class of a managed bean or session bean Y .If X declares a non-static producer or disposer method x() then Y does not inherit this method.

da)

Check managed bean X directly extends managed bean Y with a non-static producer method

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testNonStaticProducerMethodNotInheritedBySpecializingSubclass()fisheye|svn
ProducerMethodDefinitionTest.testNonStaticProducerMethodNotInherited()fisheye|svn
db)

Check managed bean X directly extends managed bean Y with a non-static disposer method

Coverage

No tests exist for this assertion

dd)

Check session bean X directly extends session bean Y with a non-static producer method

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition.enterprise
EnterpriseProducerMethodDefinitionTest.testNonStaticProducerMethodNotInheritedBySpecializingSubclass()fisheye|svn
EnterpriseProducerMethodDefinitionTest.testNonStaticProducerMethodNotInherited()fisheye|svn
de)

Check session bean X directly extends session bean Y with a non-static disposer method

Coverage

No tests exist for this assertion

dg)

Check managed bean X indirectly extends managed bean Y with a non-static producer method

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testNonStaticProducerMethodNotInherited()fisheye|svn
dh)

Check managed bean X indirectly extends managed bean Y with a non-static disposer method

Coverage

No tests exist for this assertion

dj)

Check session bean X indirectly extends session bean Y with a non-static producer method

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition.enterprise
EnterpriseProducerMethodDefinitionTest.testNonStaticProducerMethodNotIndirectlyInherited()fisheye|svn
dk)

Check session bean X indirectly extends session bean Y with a non-static disposer method

Coverage

No tests exist for this assertion

Suppose a class X is extended directly or indirectly by the bean class of a managed bean or session bean Y. If X declares a non-static producer field x then Y does not inherit this field.

ea)

Check managed bean X directly extends managed bean Y

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testNonStaticProducerFieldNotInherited()fisheye|svn
ec)

Check managed bean X indirectly extends managed bean Y

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.definition
ProducerFieldDefinitionTest.testNonStaticProducerFieldNotIndirectlyInherited()fisheye|svn

If X is a generic type, and an injection point, producer method, producer field, disposer method or observer method declared by X is inherited by Y, and the declared type of the injection point, producer method, producer field, disposed para- meter or event parameter contains type variables declared by X, the type of the injection point, producer method, producer field, disposed parameter or event parameter inherited in Y is the declared type, after substitution of actual type arguments declared by Y or any intermediate class that is a subclass of X and a superclass of Y.

f)

Check injection point

Coverage

No tests exist for this assertion

g)

Check producer method

Coverage

No tests exist for this assertion

h)

Check producer field

Coverage

No tests exist for this assertion

i)

Check disposer method

Coverage

No tests exist for this assertion

j)

check observer method

Coverage

No tests exist for this assertion

Section 4.3 - Specialization

a)

If two beans both support a certain bean type, and share at least one qualifier, then they are both eligible for injection to any injection point with that declared type and qualifier.

When an enabled bean specializes a second bean, we can be certain that the second bean is never instantiated or called by the container. Even if the second bean defines a producer or observer method, the method will never be called.

ca)

The second bean is never instantiated.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.specialization
VetoTest.testSpecializedBeanAvailableAfterSpecializingBeanVetoed()fisheye|svn
SpecializationTest.testProcessBeanAttributesFiredProperlyForSpecializedBean()fisheye|svn
org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise
EnterpriseBeanSpecializationIntegrationTest.testSpecializedBeanNotInstantiated()fisheye|svn
cb)

Producer method on specialized bean is not called.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.simple
SimpleBeanSpecializationTest.testProducerMethodOnSpecializedBeanNotCalled()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testNonStaticProducerMethodNotInheritedBySpecializingSubclass()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle
ProducerMethodLifecycleTest.testProducerMethodFromSpecializedBeanUsed()fisheye|svn
cc)

Observer method on specialized bean is not called.

Coverage

org.jboss.jsr299.tck.tests.event
EventTest.testObserverCalledOnMostSpecializedInstance()fisheye|svn
cd)

Producer field on specialized bean is not used.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle
ProducerFieldLifecycleTest.testProducerFieldFromSpecializingBeanUsed()fisheye|svn

Section 4.3.1 - Direct and indirect specialization

ia)

A bean X is said to specialize another bean Y if X directly specializes Y.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.simple
SimpleBeanSpecializationTest.testSpecializingBeanHasQualifiersOfSpecializedAndSpecializingBean()fisheye|svn
ib)

A bean X is said to specialize another bean Y if a bean Z exists, such that X directly specializes Z and Z specializes Y.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.simple
SimpleBeanSpecializationTest.testSpecializingBeanHasQualifiersOfSpecializedAndSpecializingBean()fisheye|svn
j)

A bean X that specializes bean Y will include all qualifiers of Y, together with all qualifiers declared explicitly by X.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.simple
SimpleBeanSpecializationTest.testSpecializingBeanHasQualifiersOfSpecializedAndSpecializingBean()fisheye|svn
org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise
EnterpriseBeanSpecializationTest.testSpecializingBeanHasBindingsOfSpecializedAndSpecializingBean()fisheye|svn
k)

A bean X that specializes bean Y will have the same name as Y if Y has a name.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.simple
SimpleBeanSpecializationTest.testSpecializingBeanHasNameOfSpecializedBean()fisheye|svn
org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise
EnterpriseBeanSpecializationTest.testSpecializingBeanHasNameOfSpecializedBean()fisheye|svn
l)

X must have all the bean types of Y. If X does not have some bean type of Y, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.types
SpecializingBeanWithoutBeanTypeOfSpecializedBeanTest.testDeployment()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.specialization.broken
TypeConflictDetectionTest.testDeployment()fisheye|svn

If Y has a name and X declares a name explicitly, using @Named, the container automatically detects the problem and treats it as a definition error.

la)

Test that a specializing producer method with a name throws a definition exception.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method.broken.specializingAndSpecializedBeanHaveName
SpecializingAndSpecializedBeanHaveNameTest.testSpecializingAndSpecializedBeanHasName()fisheye|svn
lb)

Test that a specializing managed bean with a name throws a definition exception.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.names
SpecializingAndSpecializedBeanHasNameTest.testSpecializingAndSpecializedBeanHasName()fisheye|svn
lc)

Test that a specializing enterprise bean with a name throws a definition exception.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.broken.sameName
SameNameTest.testSpecializingAndSpecializedBeanHasName()fisheye|svn
n)

If an interceptor or decorator is annotated @Specializes, non-portable behavior results.

Section 5 - Dependency injection, lookup, and EL

b)

The container is required to support circularities in the bean dependency graph where at least one bean participating in every circular chain of dependencies has a normal scope, as defined in Section 6.3, "Normal scopes and pseudo-scopes".

Coverage

org.jboss.jsr299.tck.tests.lookup.circular
CircularDependencyTest.testCircularInjectionOnTwoNormalBeans()fisheye|svn
CircularDependencyTest.testCircularInjectionOnOneNormalAndOneDependentBean()fisheye|svn
CircularDependencyTest.testNormalProducerMethodDeclaredOnNormalBeanWhichInjectsProducedBean()fisheye|svn
CircularDependencyTest.testNormalProducerMethodDeclaredOnDependentBeanWhichInjectsProducedBean()fisheye|svn
CircularDependencyTest.testDependentProducerMethodDeclaredOnNormalBeanWhichInjectsProducedBean()fisheye|svn
CircularDependencyTest.testNormalCircularConstructors()fisheye|svn
CircularDependencyTest.testNormalAndDependentCircularConstructors()fisheye|svn
CircularDependencyTest.testSelfConsumingConstructorsOnNormalBean()fisheye|svn
c)

The container is not required to support circular chains of dependencies where every bean participating in the chain has a pseudo-scope.

Section 5.1 - Modularity

Beans packaged in a certain Java EE module or library are available for injection, lookup and EL resolution to classes and JSP/JSF pages packaged in some other Java EE module or library if and only if the first module or library is required to be accessible to the other module or library by the Java EE platform specification.

aa)

Test with injection.

Coverage

org.jboss.jsr299.tck.tests.lookup.modules
EnabledManagedBeanInjectionAvailabilityTest.testInjection()fisheye|svn
EnabledSessionBeanInjectionAvailabilityTest.testInjection()fisheye|svn
ab)

Test with lookup.

Coverage

org.jboss.jsr299.tck.tests.lookup.modules
InterModuleLookupTest.testEnabledManagedBeanAvailableForInjection()fisheye|svn
ac)

Test with EL resolution.

Coverage

org.jboss.jsr299.tck.tests.lookup.modules
InterModuleELResolutionTest.testEnabledManagedBeanAvailableForELResolution()fisheye|svn
d)

An alternative is never available for injection, lookup or EL resolution in a Java EE module or library that is not a bean deployment archive (a module or library with no beans.xml file.

e)

Nor is an alternative available for injection, lookup or EL resolution in every bean deployment archive. An alternative must be explicitly selected in every bean deployment archive in which the alternative should be available for injection, lookup and EL resolution.

Coverage

org.jboss.jsr299.tck.tests.alternative
AlternativeAvailabilityTest.testAlternativeAvailability()fisheye|svn

Section 5.1.1 - Declaring selected alternatives for a bean deployment archive

c)

By default, a bean deployment archive has no selected alternatives. An alternative must be explicitly declared using the <alternatives> element of the beans.xml file of the bean deployment archive.

Coverage

org.jboss.jsr299.tck.tests.alternative
AlternativeAvailabilityTest.testAlternativeAvailability()fisheye|svn
d)

The <alternatives> element contains a list of bean classes and stereotypes.

An alternative is selected for the bean deployment archive if the alternative is a managed bean or session bean and the bean class of the bean is listed.

ea)

Test with a managed bean.

Coverage

org.jboss.jsr299.tck.tests.alternative
AlternativeAvailabilityTest.testAlternativeAvailability()fisheye|svn
eb)

Test with a session bean.

Coverage

org.jboss.jsr299.tck.tests.alternative.enterprise
SessionBeanAlternativeTest.testEnabledPolicyAvailable()fisheye|svn

An alternative is selected for the bean deployment archive if the policy is a producer method, field or resource, and the bean class that declares the method or field is listed.

fa)

Test for enablement of a producer method and field.

Coverage

org.jboss.jsr299.tck.tests.alternative
AlternativeAvailabilityTest.testProducersOnAlternativeClass()fisheye|svn
fb)

Test for enablement of a resource.

Coverage

No tests exist for this assertion

g)

An alternative is selected for the bean deployment archive if any @Alternative stereotype of the alternative is listed.

Coverage

org.jboss.jsr299.tck.tests.alternative
AlternativeAvailabilityTest.testAnyEnabledAlternativeStereotypeMakesAlternativeEnabled()fisheye|svn
h)

Each child <class> element must specify the name of a alternative bean class. If there is no class with the specified name, or if the class with the specified name is not an alternative bean class, the container automatically detects the problem and treats it as a deployment problem.

Coverage

org.jboss.jsr299.tck.tests.alternative.broken.not.alternative
ClassIsNotAlternativeTest.test()fisheye|svn
org.jboss.jsr299.tck.tests.alternative.broken.incorrect.name
NoClassWithSpecifiedNameTest.test()fisheye|svn
i)

Each child <stereotype> element must specify the name of a @Alternative stereotype annotation. If there is no annotation with the specified name, or the annotation is not a @Alternative stereotype, the container automatically detects the problem and treats it as a deployment problem.

Coverage

org.jboss.jsr299.tck.tests.alternative.broken.not.alternative.stereotype
ClassIsNotAlternativeTest.test()fisheye|svn
org.jboss.jsr299.tck.tests.alternative.broken.incorrect.name.stereotype
NoAnnotationWithSpecifiedNameTest.test()fisheye|svn
j)

If the same type is listed twice under the <alternatives> element, the container automatically detects the problem and treats it as a deployment problem.

Coverage

org.jboss.jsr299.tck.tests.alternative.broken.same.type.twice
SameTypeListedTwiceTest.test()fisheye|svn
k)

For a custom implementation of the Bean interface defined in Section 11.1, "The Bean interface", the container calls isAlternative() to determine whether the bean is an alternative, and getBeanClass() and getStereotypes() to determine whether an alternative is selected in a certain bean deployment archive.

Coverage

org.jboss.jsr299.tck.tests.definition.bean.custom
CustomBeanImplementationTest.testGetStereotypesCalled()fisheye|svn
CustomBeanImplementationTest.testIsPolicyCalled()fisheye|svn
CustomBeanImplementationTest.testGetBeanClassCalled()fisheye|svn

Section 5.1.2 - Enabled and disabled beans

a)

A bean is said to be enabled if it is deployed in a bean deployment archive, and it is not a producer method or field of a disabled bean, and it is not specialized by any other enabled bean, as defined in Section 4.3, "Specialization", and either it is not an alternative, or it is a selected alternative of at least one bean deployment archive. Otherwise, the bean is said to be disabled.

Section 5.1.3 - Inconsistent specialization

a)

Suppose an enabled bean X specializes a second bean Y. If there is another enabled bean that specializes Y we say that inconsistent specialization exists. The container automatically detects inconsistent specialization and treats it as a deployment problem.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.inconsistent
InconsistentSpecializationTest.testInconsistentSpecialization()fisheye|svn

Section 5.1.4 - Inter-module injection

A bean is available for injection in a certain module if the bean is not an interceptor or decorator, the bean is enabled, the bean is either not an alternative, or the module is a bean archive and the bean is a selected alternative of the bean archive, and the bean class is required to be accessible to classes in the module, according to the class accessibility requirements of the module architecture.

a)

Check a decorator can not be injected

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator
DecoratorNotInjectedTest.testDecoratorNotResolved()fisheye|svn
b)

Check an interceptor can not be injected

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.interceptor
InterceptorNotResolvedTest.testInterceptorNotResolved()fisheye|svn
c)

Check an enabled managed bean can be injected

Coverage

org.jboss.jsr299.tck.tests.lookup.modules
EnabledManagedBeanInjectionAvailabilityTest.testInjection()fisheye|svn
d)

Check an enabled session bean can be injected

Coverage

org.jboss.jsr299.tck.tests.lookup.modules
EnabledSessionBeanInjectionAvailabilityTest.testInjection()fisheye|svn
e)

Check an enabled producer field can be injected

Coverage

org.jboss.jsr299.tck.tests.lookup.modules
EnabledProducerFieldInjectionAvailabilityTest.testInjection()fisheye|svn
f)

Check an enabled producer method can be injected

Coverage

org.jboss.jsr299.tck.tests.lookup.modules
EnabledProducerMethodInjectionAvailabilityTest.testInjection()fisheye|svn
g)

Check producer method of a disabled bean is not injectable

Coverage

org.jboss.jsr299.tck.tests.lookup.modules.broken
DisabledProducerMethodInjectionNotAvailableTest.testInjection()fisheye|svn
h)

Check producer field of a disabled bean is not injectable

Coverage

org.jboss.jsr299.tck.tests.lookup.modules.broken
DisabledProducerFieldInjectionNotAvailableTest.testInjection()fisheye|svn
i)

Check a disabled managed bean is not injectable

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testPolicyNotAvailableInNonDeploymentArchive()fisheye|svn
j)

Check a disabled session bean is not injectable

Coverage

org.jboss.jsr299.tck.tests.lookup.modules.broken
DisabledSessionBeanInjectionNotAvailableTest.testInjection()fisheye|svn
k)

Check a specialized session bean is not injectable

Coverage

org.jboss.jsr299.tck.tests.lookup.modules
SpecializedBeanInjectionNotAvailableTest.testSessionBeanInjection()fisheye|svn
l)

Check a specialized managed bean is not injectable

Coverage

org.jboss.jsr299.tck.tests.lookup.modules
SpecializedBeanInjectionNotAvailableTest.testManagedBeanInjection()fisheye|svn
m)

Check a specialized producer field is not injectable

n)

Check a specialized producer method is not injectable

Coverage

org.jboss.jsr299.tck.tests.lookup.modules
SpecializedProducerMethodInjectionNotAvailableTest.testManagedBeanInjection()fisheye|svn
o)

Check a selected alternative is injected for a managed bean

Coverage

org.jboss.jsr299.tck.tests.lookup.modules
SelectedAlternativeManagedBeanInjectionAvailabilityTest.testInjection()fisheye|svn
p)

Check a selected alternative is injected for a session bean

Coverage

org.jboss.jsr299.tck.tests.lookup.modules
SelectedAlternativeSessionBeanInjectionAvailabilityTest.testInjection()fisheye|svn

For a custom implementation of the Bean interface defined in Section 11.1, "The Bean interface, the container calls getBeanClass() to determine the bean class of the bean and InjectionPoint.getMember() and then Member.getDeclaringClass() to determine the class that declares an injection point.

q)

Check Bean.getBeanClass() is used to determine the bean class

Coverage

org.jboss.jsr299.tck.tests.definition.bean.custom
CustomBeanImplementationTest.testGetBeanClassCalled()fisheye|svn
r)

Check InjectionPoint.getMember().getDeclaringClass() is used to determine the class declaring the injection point

Coverage

No tests exist for this assertion

Section 5.2 - Typesafe resolution

The following assertion is not made explicitly by the spec, however it is implied hc)

Check multiple types resolve to a single getBeans()

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testResolveByType()fisheye|svn

A bean is assignable to a given injection point if the bean has a bean type that matches the required type. For this purpose, primitive types are considered to match their corresponding wrapper types in java.lang and array types are considered to match only if their element types are identical. Parameterized and raw types are considered to match if they are identical or if the bean type is assignable to the required type, as defined in Section 5.2.3, "Assignability of raw and parameterized types".

i)

Test with a primitive type.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testResolveByTypeWithPrimitives()fisheye|svn
j)

Test with an array type.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testResolveByTypeWithArray()fisheye|svn
ka)

Test with a parameterized type.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testResolveByTypeWithTypeParameter()fisheye|svn
kb)

Test with a raw type.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized
AssignabilityOfRawAndParameterizedTypesTest.testAssignabilityToRawType()fisheye|svn
kc)

Test with a @Named bean.

Coverage

org.jboss.jsr299.tck.tests.lookup.injection
InjectionTest.testInjectionOfNamedBean()fisheye|svn

A bean is assignable to a given injection point if the bean has all the required qualifiers. If no required qualifiers were explicitly specified, the container assumes the required qualifier @Default. A bean has the required qualifier if it has a qualifier with (a) the same type and (b) the same annotation member value for each member which is not annotated @javax.enterprise.util.NonBinding.

la)

Test with beans with required qualifiers.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testAllQualifiersSpecifiedForResolutionMustAppearOnBean()fisheye|svn
lb)

Test with beans without required qualifiers.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testDefaultBindingTypeAssumed()fisheye|svn
lc)

Test with matching beans with matching qualifier with same type.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testAllQualifiersSpecifiedForResolutionMustAppearOnBean()fisheye|svn
ld)

Test with matching beans with matching qualifier with same annotation member value for each member which is not annotated @javax.enterprise.util.NonBinding.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testResolveByTypeWithNonBindingMembers()fisheye|svn
n)

A bean is eligible for injection to a certain injection point if it is available for injection in the module that contains the class that declares the injection point, and it is assignable to the injection point.

Coverage

No tests exist for this assertion

For a custom implementation of the Bean interface defined in Section 11.1, "The Bean interface", the container calls getTypes() and getQualifiers() to determine the bean types and qualifiers.

na)

Test getTypes() determines bean types.

Coverage

org.jboss.jsr299.tck.tests.definition.bean.custom
CustomBeanImplementationTest.testGetTypesCalled()fisheye|svn
nb)

Test getQualifiers() determines qualifiers.

Coverage

org.jboss.jsr299.tck.tests.definition.bean.custom
CustomBeanImplementationTest.testGetBindingsCalled()fisheye|svn

Section 5.2.1 - Unsatisfied and ambiguous dependencies

The container must validate all injection points of all enabled beans and of all other Java EE component classes supporting injection when the application is initialized to ensure that there are no unsatisfied or ambiguous dependencies. If an unsatisfied or ambiguous dependency exists, the container automatically detects the problem and treats it as a deployment problem.

aa)

Test unsatisfied dependency.

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enums.broken
EnumValidationTest.testDeployment()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.dependency.resolution.broken.unsatisfied
UnsatisfiedDependencyTest.testUnsatisfiedDependency()fisheye|svn
org.jboss.jsr299.tck.tests.event.observer.broken.validation
ObserverMethodParameterInjectionValidationTest.test()fisheye|svn
ab)

Test ambiguous dependency.

Coverage

org.jboss.jsr299.tck.tests.lookup.dependency.resolution.broken.ambiguous
AmbiguousDependencyTest.testAmbiguousDependency()fisheye|svn
b)

For a custom implementation of the Bean interface defined in Section 11.1, "The Bean interface", the container calls getInjectionPoints() to determine the set of injection points.

Coverage

org.jboss.jsr299.tck.tests.definition.bean.custom
CustomBeanImplementationTest.testGetInjectionPointsCalled()fisheye|svn

Section 5.2.2 - Legal injection point types

a)

Any legal bean type, as defined in Section 2.2.1, "Legal bean types" may be the required type of an injection point.

Coverage

No tests exist for this assertion

b)

The required type of an injection point may contain a wildcard type parameter. However, a type variable is not a legal injection point type.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized
AssignabilityOfRawAndParameterizedTypesTest.testAssignabilityOfParameterizedTypeWithActualTypesToParameterizedTypeWithWildcardsAtInjectionPoint()fisheye|svn
c)

If an injection point type is a type variable, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.broken.type.variable
TypeVariableInjectionPointTest.testTypeVariableInjectionPoint()fisheye|svn

Section 5.2.3 - Assignability of raw and parameterized types

a)

A parameterized bean type is considered assignable to a raw required type if the raw types are identical and all type parameters of the bean type are either unbounded type variables or java.lang.Object.

Coverage

No tests exist for this assertion

A parameterized bean type is considered assignable to a parameterized required type if they have identical raw type and for each parameter: the required type parameter and the bean type parameter are actual types with identical raw type, and, if the type is parameterized, the bean type parameter is assignable to the required type parameter according to these rules, or the required type parameter is a wildcard, the bean type parameter is an actual type and the actual type is assignable to the upper bound, if any, of the wildcard and assignable from the lower bound, if any, of the wildcard, or the required type parameter is a wildcard, the bean type parameter is a type variable and the upper bound of the type variable is assignable to or assignable from the upper bound, if any, of the wildcard and assignable from the lower bound, if any, of the wildcard, or the required type parameter is an actual type, the bean type parameter is a type variable and the actual type is as- signable to the upper bound, if any, of the type variable, or the required type parameter and the bean type parameter are both type variables and the upper bound of the required type parameter is assignable to the upper bound, if any, of the bean type parameter.

aa)

Check all type parameters of the bean type and required type are unbounded type variables.

Coverage

No tests exist for this assertion

ab)

Check all type parameters of the bean type and required type are java.lang.Objects.

Coverage

No tests exist for this assertion

ba)

Check the required type parameter and the bean type parameter are actual types with identical raw type

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized
AssignabilityOfRawAndParameterizedTypesTest.testAssignabilityOfParameterizedTypeWithActualTypesToParameterizedTypeWithActualTypes()fisheye|svn
bb)

Check the required type parameter and the bean type parameter are actual types with identical raw type for nested type parameters

Coverage

No tests exist for this assertion

c)

Check the required type parameter is a wildcard, the bean type parameter is an actual type and the actual type is assignable to the upper bound of the wildcard and assignable from the lower bound of the wildcard

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized
AssignabilityOfRawAndParameterizedTypesTest.testAssignabilityOfParameterizedTypeWithActualTypesToParameterizedTypeWithWildcards()fisheye|svn
da)

Check the required type parameter is a wildcard, the bean type parameter is a type variable and the upper bound of the type variable is assignable to the upper bound of the wildcard and assignable from the lower bound of the wildcard

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized
AssignabilityOfRawAndParameterizedTypesTest.testAssignabilityOfParameterizedTypeWithTypeVariablesToParameterizedTypeWithWildcards()fisheye|svn
db)

Check the required type parameter is a wildcard, the bean type parameter is a type variable and the upper bound of the type variable is assignable from the upper bound of the wildcard and assignable from the lower bound of the wildcard

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized
AssignabilityOfRawAndParameterizedTypesTest.testAssignabilityOfParameterizedTypeWithTypeVariablesToParameterizedTypeWithWildcards2()fisheye|svn
e)

Check the required type parameter is an actual type, the bean type parameter is a type variable and the actual type is assignable to the upper bound of the type variable

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized
AssignabilityOfRawAndParameterizedTypesTest.testAssignabilityOfParameterizedTypeWithTypeVariablesToParameterizedTypeWithActualTypes()fisheye|svn
f)

Check the required type parameter and the bean type parameter are both type variables and the upper bound of the required type parameter is assignable to the upper bound of the bean type parameter.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized
AssignabilityOfRawAndParameterizedTypesTest.testAssignabilityOfParameterizedTypeWithTypeVariablesToParameterizedTypeTypeVariable()fisheye|svn

Section 5.2.4 - Primitive types and null values

If necessary, the container performs boxing or unboxing when it injects a value to a field or parameter of primitive or wrapper type.

aa)

Test boxing.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.broken.primitive
PrimitiveInjectionPointTest.testPrimitiveInjectionPointResolvedToNonPrimitiveProducerMethod()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.injection
InjectionTest.testInjectionPerformsBoxingIfNecessary()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.injection.nullableBean
NullableBeanTest.testPrimitiveInjectionPointResolvesToNullableWebBean()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testResolveByTypeWithPrimitives()fisheye|svn
ab)

Test unboxing.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testResolveByTypeWithPrimitives()fisheye|svn
aa)

If an injection point of primitive type resolves to a bean that may have null values, such as a producer method with a nonprimitive return type or a producer field with a non-primitive type, the container automatically detects the problem and treats it as a deployment problem.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.broken.primitive
PrimitiveInjectionPointTest.testPrimitiveInjectionPointResolvedToNonPrimitiveProducerMethod()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.injection
InjectionTest.testInjectionPerformsBoxingIfNecessary()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.injection.nullableBean
NullableBeanTest.testPrimitiveInjectionPointResolvesToNullableWebBean()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testResolveByTypeWithPrimitives()fisheye|svn
ba)

For a custom implementation of the Bean interface defined in Section 11.1, "The Bean interface", the container calls isNullable() to determine whether the bean may have null values.

Coverage

org.jboss.jsr299.tck.tests.definition.bean.custom
CustomBeanImplementationTest.testIsNullableCalled()fisheye|svn
org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testIsNullable()fisheye|svn

Section 5.2.5 - Qualifier annotations with members

a)

Qualifier types may have annotation members.

b)

An annotation member may be excluded from consideration using the @NonBinding annotation.

Coverage

org.jboss.jsr299.tck.tests.lookup.binding.members.array
BindingAnnotationWithMemberTest.testArrayMemberWithNonBinding()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.binding.members.annotation
BindingAnnotationWithMemberTest.testAnnotationMemberWithNonBinding()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testResolveByTypeWithNonBindingMembers()fisheye|svn
c)

Array-valued or annotation-valued members of a qualifier type should be annotated @NonBinding in a portable application. If an array-valued or annotation-valued member of a qualifier is not annotated @NonBinding, non-portable behavior results.

Section 5.2.6 - Multiple qualifiers

a)

A bean class may declare multiple qualifiers.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testAllQualifiersSpecifiedForResolutionMustAppearOnBean()fisheye|svn
b)

A producer method may declare multiple qualifiers.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testResolveByTypeWithPrimitives()fisheye|svn
c)

A producer field may declare multiple qualifiers.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testResolveByTypeWithPrimitives()fisheye|svn
d)

A bean must declare all of the qualifiers that are specified at the injection point to be considered a candidate for injection.

Coverage

org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest.testAllQualifiersSpecifiedForResolutionMustAppearOnBean()fisheye|svn

Section 5.3 - EL Name resolution

d)

An EL name resolves to a bean if the bean has the given EL name, and the bean is available for injection in the war containing the JSP or JSF page with the EL expression.

Coverage

org.jboss.jsr299.tck.tests.lookup.el.integration
IntegrationWithUnifiedELTest.testELResolverRegisteredWithJsf()fisheye|svn
IntegrationWithUnifiedELTest.testELResolverRegisteredWithServletContainer()fisheye|svn
e)

For a custom implementation of the Bean interface defined in Section 11.1, "The Bean interface", the container calls getName() to determine the bean EL name.

Coverage

org.jboss.jsr299.tck.tests.definition.bean.custom
CustomBeanImplementationTest.testGetNameCalled()fisheye|svn

Section 5.3.1 - Ambiguous EL names

ca)

An ambiguous EL name exists in an EL expression when an EL name resolves to multiple beans. When an ambiguous EL name exists, the container attempts to resolve the ambiguity. If any of the beans are alternatives, the container eliminates all beans that are not alternatives. If there is exactly one bean remaining, the container will select this bean, and the ambiguous EL name is called resolvable.

Coverage

org.jboss.jsr299.tck.tests.lookup.byname
ResolutionByNameTest.testAmbiguousELNamesResolved()fisheye|svn

All unresolvable ambiguous EL names are detected by the container when the application is initialized. Suppose two beans are both accessible to classes in a certain war, and either the two beans have the same EL name and the name is not resolvable, or the EL name of one bean is of the form x.y, where y is a valid bean EL name, and x is the EL name of the other bean, the container automatically detects the problem and treats it as a deployment problem.

da)

Test with two beans with the same EL name.

Coverage

org.jboss.jsr299.tck.tests.lookup.byname.duplicateNameResolution
DuplicateNameResolutionTest.testDuplicateNamedBeans()fisheye|svn
db)

Test with with an EL name in the form x.y.

Coverage

org.jboss.jsr299.tck.tests.lookup.byname.duplicatePrefixResolution
DuplicateNamePrefixResolutionTest.testDuplicateBeanNamePrefix()fisheye|svn

Section 5.4 - Client proxies

b)

A contextual reference to a bean with a normal scope, as defined in Section 6.3, “Normal scopes and pseudo-scopes”, is not a direct reference to a contextual instance of the bean (the object returned by Contextual.create()). Instead, the contextual reference is a client proxy object.

Coverage

org.jboss.jsr299.tck.tests.lookup.clientProxy
ClientProxyTest.testClientProxyUsedForNormalScope()fisheye|svn
a)

Client proxies are never required for a bean whose scope is a pseudo-scope such as @Dependent.

The following assertion is not made explicitly by the spec, however it is implied c)

Client proxies are serializable

Coverage

org.jboss.jsr299.tck.tests.lookup.clientProxy
ClientProxyTest.testSimpleBeanClientProxyIsSerializable()fisheye|svn
d)

The container must guarantee that when any valid injected reference to a bean of normal scope is invoked, the invocation is always processed by the current instance of the injected bean.

Coverage

org.jboss.jsr299.tck.tests.lookup.clientProxy.incontainer
ClientProxyTest.testInvocationIsProcessedOnCurrentInstance()fisheye|svn
e)

Client proxies may be shared between multiple injection points.

Section 5.4.1 - Unproxyable bean types

Certain legal bean types cannot be proxied by the container. If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope, the container automatically detects the problem and treats it as a deployment problem.

aa)

Test a class which doesn't have a non-private constructor with no parameters.

Coverage

org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable.privateConstructor
PrivateConstructorTest.testClassWithPrivateConstructor()fisheye|svn
baa)

Test a class which is declared final.

Coverage

org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable.finalClass
FinalClassTest.testInjectionPointWithUnproxyableTypeWhichResolvesToNormalScopedBean()fisheye|svn
org.jboss.jsr299.tck.tests.deployment.lifecycle.broken.normalScope
AddingNormalScopeTest.testAddingScopeType()fisheye|svn
bba)

Test a class that has non-static, final method with public visibility.

Coverage

org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable.finalMethod
NonPrivateNonStaticMethodTest.testClassWithPublicFinalMethodCannotBeProxied()fisheye|svn
bca)

Test with a class that has static final method with public visibility.

Coverage

org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable.finalMethod
StaticFinalMethodTest.testClassWithStaticFinalMethodCanBeProxied()fisheye|svn
bda)

Test a class that has final method with private visibility.

Coverage

org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable.finalMethod
PrivateFinalMethodTest.testClassWithPrivateFinalMethodCanBeProxied()fisheye|svn
ca)

Test primitive type

Coverage

org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable.primitive
UnproxyableTest.testInjectionPointWithUnproxyableTypeWhichResolvesToNormalScopedBean()fisheye|svn
da)

Test array type.

Coverage

org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable.array
ArrayTest.testInjectionPointWithArrayType()fisheye|svn

Section 5.4.2 - Client proxy invocation

aa)

Every time a method of the bean is invoked upon a client proxy, the client proxy must obtain a contextual instance of the bean, as defined in Section 6.5.2, "Contextual instance of a bean", and invoke the method upon this instance.

Coverage

org.jboss.jsr299.tck.tests.lookup.clientProxy
ClientProxyTest.testClientProxyInvocation()fisheye|svn
ab)

If the scope is not active, as specified in Section 6.5.1, "The active context object for a scope", the client proxy rethrows ContextNotActiveException or IllegalStateException.

Coverage

org.jboss.jsr299.tck.tests.lookup.clientProxy
ClientProxyTest.testInactiveScope()fisheye|svn
b)

The behavior of all methods declared by java.lang.Object, except for toString(), is undefined for a client proxy.

Section 5.5 - Dependency injection

a)

The container is required to perform dependency injection whenever it creates a contextual instance of a session bean.

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionTest.testInjectionOnContextualSessionBean()fisheye|svn
b)

The container is required to perform dependency injection whenever it creates a contextual instance of a managed bean.

Coverage

org.jboss.jsr299.tck.tests.lookup.injection
InjectionTest.testInjectionOfNamedBean()fisheye|svn
c)

The container is required to perform dependency injection whenever it instantiates non-contextual instances of session beans (for example, session beans obtained by the application from JNDI or injected using @EJB).

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionTest.testInjectionOnNonContextualSessionBean()fisheye|svn
d)

The container is required to perform dependency injection whenever it instantiates non-contextual instances of managed beans.

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoJSFManagedBean()fisheye|svn
da)

The container is required to perform dependency injection whenever it instantiates non-contextual instances of enums.

Coverage

No tests exist for this assertion

The container is required to perform dependency injection whenever it instantiates instances of any other Java EE component class supporting injection.

ea)

Test injection into a servlet listener

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoServletListener()fisheye|svn
eb)

Test injection into a tag handler

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoTagHandler()fisheye|svn
ec)

Test injection into a tag library listener

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoTagLibraryListener()fisheye|svn
ed)

Test injection into an EJB Interceptor

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionTest.testInjectionOnEJBInterceptor()fisheye|svn
ee)

Test injection into a WS endpoint

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws
InjectionIntoWebServiceEndPointTest.testInjectionIntoWebServiceEndpoint()fisheye|svn
ef)

Test injection into a servlet

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoServlet()fisheye|svn
eg)

Test injection into a filter

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoFilter()fisheye|svn
f)

A Java EE 5 container is not required to support injection for non-contextual objects.

g)

The container interacts with instances of beans, enums and other Java EE component classes supporting injection by calling methods and getting and setting the field values.

Coverage

No tests exist for this assertion

h)

The object injected by the container may not be a direct reference to a contextual instance of the bean. Instead, it is an injectable reference, as defined by Section 6.5.5, "Injectable references".

Coverage

No tests exist for this assertion

Section 5.5.1 - Injection using the bean constructor

When the container instantiates a managed bean or session bean with a constructor annotated @Inject, the container calls this constructor, passing an injectable reference to each parameter. If there is no constructor annotated @Inject, the container calls the constructor with no parameters.

aa)

Test managed bean with a constructor annotated @Inject.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition
SimpleBeanDefinitionTest.testInitializerAnnotatedConstructorUsedOverEmptyConstuctor()fisheye|svn
ab)

Test session bean with a constructor annotated @Inject.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.definition
EnterpriseBeanDefinitionTest.testConstructorAnnotatedInjectCalled()fisheye|svn
ba)

Test constructor with no parameters is used for a managed bean

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition
SimpleBeanDefinitionTest.testEmptyConstructorUsed()fisheye|svn
bb)

Test constructor with no parameters is used for a session bean

Coverage

No tests exist for this assertion

Section 5.5.2 - Injection of fields and initializer methods

When the container creates a new instance of a managed bean, session bean, enum or of any other Java EE component class supporting injection, the container must: Initialize the values of all injected fields. The container sets the value of each injected field to an injectable reference. Call all initializer methods, passing an injectable reference to each parameter.

aa)

Test session bean fields injected

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionTest.testInjectionOnContextualSessionBean()fisheye|svn
ab)

Test session bean initializer methods called

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionTest.testInjectionOnContextualSessionBean()fisheye|svn
ac)

Test managed bean fields injected

Coverage

org.jboss.jsr299.tck.tests.lookup.injection
InjectionTest.testInjectionOfNamedBean()fisheye|svn
ad)

Test managed bean initializer methods called

Coverage

org.jboss.jsr299.tck.tests.implementation.initializer
InitializerMethodTest.testMultipleInitializerMethodsAreCalled()fisheye|svn
ada)

Test enum fields injected

Coverage

No tests exist for this assertion

adb)

Test enum initializer methods called

Coverage

No tests exist for this assertion

ae)

Test Servlet fields injected

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoServlet()fisheye|svn
af)

Test Servlet initializer methods called

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testServletInitializerMethodCalled()fisheye|svn
ag)

Test Servlet Filter fields injected

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoFilter()fisheye|svn
ah)

Test Servlet Filter initializer methods called

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testFilterInitializerMethodCalled()fisheye|svn
ai)

Test Servlet Listener fields injected

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoServletListener()fisheye|svn
aj)

Test Servlet Listener initializer methods called

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testServletListenerInitializerMethodCalled()fisheye|svn
ak)

Test non-contextual session bean fields injected

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionTest.testInjectionOnNonContextualSessionBean()fisheye|svn
al)

Test non-contextual session bean initializer methods called

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionTest.testInjectionOnNonContextualSessionBean()fisheye|svn
am)

Test tag handler fields injected

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoTagHandler()fisheye|svn
an)

Test tag handler initializer methods called

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoTagHandler()fisheye|svn
ao)

Test EJB interceptor fields injected

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionTest.testInjectionOnEJBInterceptor()fisheye|svn
ap)

Test EJB interceptor initializer methods called

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionTest.testInjectionOnEJBInterceptor()fisheye|svn
aq)

Test WS endpoint fields injected

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws
InjectionIntoWebServiceEndPointTest.testInjectionIntoWebServiceEndpoint()fisheye|svn
ar)

Test WS endpoint bean initializer methods called

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws
InjectionIntoWebServiceEndPointTest.testInjectionIntoWebServiceEndpoint()fisheye|svn
as)

Test tag handler listener fields injected

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoTagLibraryListener()fisheye|svn
at)

Test tag handler listener initializer methods called

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testTagLibraryListenerInitializerMethodCalled()fisheye|svn
au)

Test JSF managed bean fields injected

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoJSFManagedBean()fisheye|svn
av)

Test JSF managed bean initializer methods called

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoJSFManagedBean()fisheye|svn

The container must ensure that: Initializer methods declared by a class X in the type hierarchy of the bean are called after all injected fields declared by X or by superclasses of X have been initialized, and after all Java EE component environment resource dependencies declared by X or by superclasses of X have been injected. Any @PostConstruct callback declared by a class X in the type hierarchy of the bean is called after all initializer meth- ods declared by X or by superclasses of X have been called, after all injected fields declared by X or by superclasses of X have been initialized, and after all Java EE component environment resource dependencies declared by X or by superclasses of X have been injected. Any servlet init() method is called after all initializer methods have been called, all injected fields have been initialized and all Java EE component environment resource dependencies have been injected.

ba)

Test session bean initializer methods called after injected field of X

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionTest.testInjectionOnContextualSessionBean()fisheye|svn
bb)

Test session bean initializer methods called after injected field of superclass of X

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionOrderingTest.testInitializerCalledAfterFieldInjectionOfSuperclass()fisheye|svn
bc)

Test session bean initializer methods called after EE resource injection of X

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionOrderingTest.testInitializerCalledAfterResourceInjection()fisheye|svn
bd)

Test session bean initializer methods called after EE resource injection of superclass of X

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionOrderingTest.testInitializerCalledAfterResourceInjection()fisheye|svn
be)

Test session bean @PostConstruct called after initializer of X

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionTest.testInjectionOnContextualSessionBean()fisheye|svn
bf)

Test session bean @PostConstruct called after initializer of superclass of X

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.enterprise
SessionBeanInjectionOrderingTest.testPostConstructCalledAfterInitializerOfSuperclass()fisheye|svn
bg)

Test managed bean initializer methods called after injected field of X

Coverage

org.jboss.jsr299.tck.tests.lookup.injection
InjectionTest.testFieldDeclaredInSuperclassInjected()fisheye|svn
bh)

Test managed bean initializer methods called after injected field of superclass of X

Coverage

org.jboss.jsr299.tck.tests.lookup.injection
InjectionTest.testFieldDeclaredInSuperclassInjected()fisheye|svn
bi)

Test managed bean initializer methods called after EE resource injection of X

Coverage

No tests exist for this assertion

bj)

Test managed bean initializer methods called after EE resource injection of superclass of X

Coverage

No tests exist for this assertion

bk)

Test managed bean @PostConstruct called after initializer of X

Coverage

No tests exist for this assertion

bl)

Test managed bean @PostConstruct called after initializer of superclass of X

Coverage

No tests exist for this assertion

bm)

Servlet init() method called after initializer method

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testServletInitializerMethodCalled()fisheye|svn
bn)

Servlet init() method called after injected fields

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoServlet()fisheye|svn
bo)

Servlet init() method called after Java EE resource injection

Coverage

No tests exist for this assertion

bp)

Servlet Filter init() method called after initializer method

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testFilterInitializerMethodCalled()fisheye|svn
bq)

Servlet Filter init() method called after injected fields

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
InjectionIntoNonContextualComponentTest.testInjectionIntoFilter()fisheye|svn
br)

Servlet Filter init() method called after Java EE resource injection

Coverage

No tests exist for this assertion

Section 5.5.3 - Destruction of dependent objects

a)

When the container destroys an instance of a bean, enum or of any Java EE component class supporting injection, the container destroys all dependent objects, as defined in Section 6.4.2, "Destruction of objects with scope @Dependent", after the @PreDestroy callback completes and after the servlet destroy() method is called.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle
EnterpriseBeanLifecycleTest.testDependentObjectsDestroyed()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testDependentsDestroyedAfterPreDestroy()fisheye|svn

Section 5.5.4 - Invocation of producer or disposer methods

a)

When the container calls a producer method, if the method is static, the container must invoke the method.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest.testStaticMethod()fisheye|svn
b)

When the container calls a disposer method, if the method is static, the container must invoke the method.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition
DisposalMethodDefinitionTest.testBindingTypesAppliedToDisposalMethodParameters()fisheye|svn
c)

When the container calls a producer method, if the method is non-static the container must obtain a contextual instance of the most specialized bean, as defined by Section 6.5.2 "Contextual instance of a bean", then invoke the method upon this instance.

Coverage

org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method
ProducerMethodSpecializationTest.testSpecializingBeanHasBindingsOfSpecializedAndSpecializingBean()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle
ProducerMethodLifecycleTest.testProducerMethodFromSpecializedBeanUsed()fisheye|svn
d)

When the container calls a disposer method, if the method is non-static the container must obtain a contextual instance of the most specialized bean, as defined by Section 6.5.2 "Contextual instance of a bean", then invoke the method upon this instance.

Coverage

No tests exist for this assertion

e)

The container passes an injectable reference to each injected method parameter. The container is also responsible for destroying dependent objects created during this invocation, as defined in Section 6.4.2, "Destruction of objects with scope @Dependent".

Coverage

No tests exist for this assertion

Section 5.5.5 - Access to producer field values

a)

When the container accesses the value of a producer field, if the producer field is static, the container must access the field value.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle
ProducerFieldLifecycleTest.testProducerStaticFieldBean()fisheye|svn
b)

When the container accesses the value of a producer field, if the producer field is non-static, the container must obtain a contextual instance of the bean which declares the producer field, as defined by Section 6.5.2 "Contextual instance of a bean", then access the field value of this instance.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle
ProducerFieldLifecycleTest.testProducerFieldBeanCreate()fisheye|svn

Section 5.5.6 - Invocation of observer methods

a)

When the container calls an observer method (defined in Section 10.4 "Observer methods"), if the observer method is static, the container must invoke the method.

Coverage

org.jboss.jsr299.tck.tests.event
EventTest.testStaticObserverMethodInvoked()fisheye|svn
baa)

When the container calls an observer method (defined in Section 10.4 "Observer methods"), if the observer method is non-static, the container must obtain a contextual instance of the bean according to Section 6.5.2 "Contextual instance of a bean". If this observer method is a conditional observer method, obtain the contextual instance that already exists, only if the scope of the bean that declares the observer method is currently active, without creating a new contextual instance. Finally, the container must invoke the observer method on the resulting instance, if any, as a business method invocation, as defined in Section 7.2 "Container invocations and interception".

Coverage

org.jboss.jsr299.tck.tests.event.observer.conditional
ConditionalObserverTest.testObserverMethodInvokedOnReturnedInstanceFromContext()fisheye|svn
ConditionalObserverTest.testConditionalObserver()fisheye|svn
org.jboss.jsr299.tck.tests.event
EventTest.testObserverCalledOnMostSpecializedInstance()fisheye|svn
c)

The container must pass the event object to the event parameter and an injectable instance to each injected method parameter.

Coverage

org.jboss.jsr299.tck.tests.event
EventTest.testObserverMethodReceivesInjectionsOnNonObservesParameters()fisheye|svn
d)

The container is also responsible for destroying dependent objects created during this invocation, as defined in Section 6.4.2, "Destruction of objects with scope @Dependent".

Coverage

No tests exist for this assertion

Section 5.5.7 - Injection point metadata

aa)

The javax.enterprise.inject.spi.InjectionPoint.getBean() method returns the Bean object representing the bean that defines the injection point.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectionPointTest.testGetBean()fisheye|svn
aaa)

If the injection point does not belong to a bean, getBean() returns a null value.

Coverage

No tests exist for this assertion

aab)

If the injection point represents a dynamically obtained instance, the getBean() method should return the Bean object representing the bean that defines the Instance injection point.

Coverage

No tests exist for this assertion

ba)

The javax.enterprise.inject.spi.InjectionPoint.getType() method returns the declared type of the injection point.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectionPointTest.testGetType()fisheye|svn
baa)

If the injection point represents a dynamically obtained instance, the javax.enterprise.inject.spi.InjectionPoint.getType() method returns the required type (as defined by Instance.select()).

Coverage

No tests exist for this assertion

bc)

The javax.enterprise.inject.spi.InjectionPoint.getQualifiers() method returns the declared qualifiers of the injection point.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectionPointTest.testGetBindingTypes()fisheye|svn
bca)

If the injection point represents a dynamically obtained instance, the javax.enterprise.inject.spi.InjectionPoint.getQualifiers() method returns required qualifiers of the injection point including any additional required qualifers (as defined by Instance.select()).

Coverage

No tests exist for this assertion

ca)

The javax.enterprise.inject.spi.InjectionPoint.getMember() method returns the Field object in the case of field injection.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectionPointTest.testGetMemberField()fisheye|svn
caa)

If the injection point represents a dynamically obtained instance, the javax.enterprise.inject.spi.InjectionPoint.getMember() method returns the Field object representing the field that defines the Instance injection point in the case of field injection.

Coverage

No tests exist for this assertion

cb)

The javax.enterprise.inject.spi.InjectionPoint.getMember() method returns the Method object in the case of method parameter injection.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectionPointTest.testGetMemberMethod()fisheye|svn
cba)

If the injection point represents a dynamically obtained instance, the javax.enterprise.inject.spi.InjectionPoint.getMember() method returns the Method object representing the method that defines the Instance injection point in the case of method parameter injection.

Coverage

No tests exist for this assertion

cc)

The javax.enterprise.inject.spi.InjectionPoint.getMember() method returns the Constructor object in the case of constructor parameter injection.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectionPointTest.testGetMemberConstructor()fisheye|svn
cca)

If the injection point represents a dynamically obtained instance, the javax.enterprise.inject.spi.InjectionPoint.getMember() method returns the Constructor object representing the constructor that defines the Instance injection point in the case of constructor parameter injection.

Coverage

No tests exist for this assertion

daa)

The getAnnotated() method returns an instance of javax.enterprise.inject.spi.AnnotatedField or javax.enterprise.inject.spi.AnnotatedParameter, depending upon whether the injection point is an injected field or a constructor/method parameter.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectionPointTest.testGetAnnotatedField()fisheye|svn
InjectionPointTest.testGetAnnotatedParameter()fisheye|svn
dab)

If the injection point represents a dynamically obtained instance, then the getAnnotated() method returns an instance of javax.enterprise.inject.spi.AnnotatedField or javax.enterprise.inject.spi.AnnotatedParameter representing the Instance injection point, depending upon whether the injection point is an injected field or a constructor/method parameter.

Coverage

No tests exist for this assertion

dba)

The isDelegate() method returns true if the injection point is a decorator delegate injection point, and false otherwise.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectionPointTest.testIsDelegate()fisheye|svn
dbb)

If the injection point represents a dynamically obtained instance then isDelegate() returns false.

Coverage

No tests exist for this assertion

dca)

The isTransient() method returns true if the injection point is a transient field, and false otherwise.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectionPointTest.testIsTransient()fisheye|svn
dcb)

If the injection point represents a dynamically obtained instance then the isTransient() method returns true if the Instance injection point is a transient field, and false otherwise.

Coverage

No tests exist for this assertion

ea)

The container must provide a bean with scope @Dependent, bean type InjectionPoint and qualifier @Default, allowing dependent objects, as defined in Section 6.4.1, "Dependent objects", to obtain information about the injection point to which they belong.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectionPointTest.testDependentScope()fisheye|svn
InjectionPointTest.testApiTypeInjectionPoint()fisheye|svn
InjectionPointTest.testCurrentBinding()fisheye|svn
eb)

The built-in implementation must be a passivation capable dependency, as defined in Section 6.6.2, "Passivation capable dependencies".

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectionPointTest.testPassivationCapability()fisheye|svn
f)

If a bean that declares any scope other than @Dependent has an injection point of type InjectionPoint and qualifier @Default, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.normal.scope
NormalScopedBeanWithInjectionPoint.testSessionScopedBeanWithInjectionPoint()fisheye|svn
ga)

If a Java EE component class supporting injection that is not a bean has an injection point of type InjectionPoint and qualifier @Default, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.not.bean
InjectionPointTest.testDefinitionErrorDetected()fisheye|svn
h)

The InjectionPoint injected into a disposer method represents the producer method for which the disposer method is being invoked.

Coverage

org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.injectionpoint
DisposalMethodInjectionPointTest.test()fisheye|svn
i)

The InjectionPoint injected into a decorator represents the injection point on the bean the decorated type is injected into.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectionPointTest.testDecoratorInjectionPoint()fisheye|svn

Section 5.5.8 - Bean metadata

The container must provide beans allowing bean instances obtain information about themselves.

a)

Bean with scope @Dependent, qualifier @Default and type Bean can be injected into any bean instance.

Coverage

org.jboss.jsr299.tck.tests.implementation.builtin.metadata
BuiltinMetadataBeanTest.testBeanMetadata()fisheye|svn
BuiltinMetadataBeanTest.testProducerAndDisposerMethodMetadata()fisheye|svn
b)

Bean with scope @Dependent, qualifier @Default and type Interceptor can be injected into any interceptor instance.

Coverage

org.jboss.jsr299.tck.tests.implementation.builtin.metadata
BuiltinMetadataBeanTest.testInterceptorMetadata()fisheye|svn
c)

Bean with scope @Dependent, qualifier @Default and type Decorator which can be injected into any decorator instance.

Coverage

org.jboss.jsr299.tck.tests.implementation.builtin.metadata
BuiltinMetadataBeanTest.testDecoratorMetadata()fisheye|svn

Additionally, the container must provide beans allowing interceptors and decorators to obtain information about the beans they intercept and decorate. These beans are passivation capable dependencies, as defined in Section 6.6.2, "Passivation capable dependencies".

d)

Bean with scope @Dependent, qualifier @??? and type Bean can be injected into any decorator instance.

Coverage

org.jboss.jsr299.tck.tests.implementation.builtin.metadata
BuiltinMetadataBeanTest.testInterceptorMetadata()fisheye|svn
e)

Bean with scope @Dependent, qualifier @??? and type Bean which can be injected into any interceptor instance.

Coverage

org.jboss.jsr299.tck.tests.implementation.builtin.metadata
BuiltinMetadataBeanTest.testDecoratorMetadata()fisheye|svn
f)

These beans are passivation capable dependencies, as defined in Section 6.6.2, "Passivation capable dependencies".

Coverage

org.jboss.jsr299.tck.tests.implementation.builtin.metadata
BuiltinMetadataBeanTest.testBeanMetadata()fisheye|svn
BuiltinMetadataBeanTest.testProducerAndDisposerMethodMetadata()fisheye|svn
BuiltinMetadataBeanTest.testInterceptorMetadata()fisheye|svn
BuiltinMetadataBeanTest.testDecoratorMetadata()fisheye|svn
BuiltinMetadataBeanTest.testIllegalInjectionDetected()fisheye|svn
The following assertion is not made explicitly by the spec, however it is implied g)

Dynamic lookup of built-in beans is not allowed.

Coverage

org.jboss.jsr299.tck.tests.implementation.builtin.metadata
BuiltinMetadataBeanTest.testIllegalInjectionDetected()fisheye|svn

Section 5.6 - Programmatic lookup

aa)

An instance of the javax.enterprise.inject.Instance interface may be injected.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testObtainsInjectsInstanceOfInstance()fisheye|svn
ba)

The method javax.enterprise.inject.Instance.get() returns a contextual reference.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testGetMethod()fisheye|svn
ca)

Any combination of qualifiers may be specified at the injection point.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testGetMethod()fisheye|svn
da)

The @Any qualifier may be used to allow the application to specify qualifiers dynamically.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testIsAmbiguous()fisheye|svn
e)

The @New qualifier may be used, allowing the application to obtain a @New qualified bean, as defined in Section 3.12, "@New qualified beans".

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testNewBean()fisheye|svn

Section 5.6.1 - The Instance interface

aa)

The Instance interface provides a method for obtaining instances of beans with a specified combination of required type and qualifiers, and inherits the ability to iterate beans with that combination of required type and qualifiers from java.lang.Iterable.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testGetMethod()fisheye|svn
DynamicLookupTest.testIteratorMethod()fisheye|svn
ab)

For an injected Instance, the required type is the type parameter specified at the injection point, and the required qualifiers are the qualifiers specified at the injection point.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testGetMethod()fisheye|svn
ba)

The select() method returns a child Instance for a given required type and additional required qualifiers. If no required type is given, the required type is the same as the parent.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testIteratorMethod()fisheye|svn
da)

If two instances of the same qualifier type are passed to select(), an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testDuplicateBindingsThrowsException()fisheye|svn
e)

If an instance of an annotation that is not a qualifier type is passed to select(), an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testNonBindingThrowsException()fisheye|svn
fa)

The get() method must identify a bean that has the required type and required qualifiers and is eligible for injection into the class into which the parent Instance was injected, according to the rules of typesafe resolution, as defined in Section 5.2, "Typesafe resolution", resolving ambiguities according to Section 5.2.1, "Unsatisfied and ambiguous dependencies".

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testGetMethod()fisheye|svn
fba)

If typesafe resolution results in an unsatisfied dependency, throw an UnsatisfiedResolutionException.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testUnsatisfiedDependencyThrowsException()fisheye|svn
fbb)

If typesafe resolution results in an unresolvable ambiguous dependency, throw an AmbiguousResolutionException.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testAmbiguousDependencyThrowsException()fisheye|svn
fc)

Otherwise, obtain a contextual reference for the bean and the required type, as defined in Section 6.5.3, "Contextual reference for a bean".

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testGetMethod()fisheye|svn
ja)

The iterator() method must identify the set of beans that have the required type and required qualifiers and are eligible for injection into the class into which the parent Instance was injected, according to the rules of typesafe resolution, as defined in Section 5.2, "Typesafe resolution".

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testIteratorMethod()fisheye|svn
ka)

The iterator() method must return an Iterator, that iterates over the set of contextual references for the resulting beans and required type, as defined in Section 6.5.3, "Contextual reference for a bean".

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testIteratorMethod()fisheye|svn
l)

The method isUnsatisfied() returns true if there is no bean that has the required type and qualifiers and is eligible for injection into the class into which the parent Instance was injected, or false otherwise.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testIsUnsatisfied()fisheye|svn
m)

The method isAmbiguous() returns true if there is more than one bean that has the required type and qualifiers and is eligible for injection into the class into which the parent Instance was injected, or false otherwise.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testIsAmbiguous()fisheye|svn

Section 5.6.2 - The built-in Instance

a)

The container must provide a built-in bean with Instance<X> and Provider<X> for every legal bean type x in its set of bean types.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic.builtin
BuiltinInstanceTest.testInstanceProvidedForEveryLegalBeanType()fisheye|svn
b)

The container must provide a built-in bean with every qualifier type in its set of qualifier types.

Coverage

No tests exist for this assertion

d)

The container must provide a built-in bean with scope @Dependent.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic.builtin
BuiltinInstanceTest.testScopeOfBuiltinInstance()fisheye|svn
e)

The container must provide a built-in bean with no bean EL name.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic.builtin
BuiltinInstanceTest.testNameOfBuiltinInstance()fisheye|svn
f)

The container must provide a built-in bean with an implementation provided automatically by the container.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic.builtin
BuiltinInstanceTest.testInstanceProvidedForEveryLegalBeanType()fisheye|svn
g)

The built-in implementation must be a passivation capable dependency, as defined in Section 6.6.2, "Passivation capable dependencies".

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic.builtin
BuiltinInstanceTest.testInstanceIsPassivationCapable()fisheye|svn

Section 5.6.3 - Using AnnotationLiteral and TypeLiteral

The following assertion is not made explicitly by the spec, however it is implied a)

Test javax.enterprise.util.AnnotationLiteral when using Instance.select() to specify qualifiers.

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testIteratorMethod()fisheye|svn
The following assertion is not made explicitly by the spec, however it is implied b)

Test javax.enterprise.util.TypeLiteral when specifying a parameterized type with actual type parameters when calling Instance.select().

Coverage

org.jboss.jsr299.tck.tests.lookup.dynamic
DynamicLookupTest.testNewBean()fisheye|svn

Section 6.1 - The Contextual interface

a0)

If an exception occurs while creating an instance, the exception is rethrown by the create() method. If the exception is a checked exception, it must be wrapped and rethrown as an (unchecked) CreationException.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testCreationExceptionWrapsCheckedExceptionThrownFromCreate()fisheye|svn
SimpleBeanLifecycleTest.testUncheckedExceptionThrownFromCreateNotWrapped()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle
ProducerMethodLifecycleTest.testCreateRethrowsUncheckedException()fisheye|svn
ProducerMethodLifecycleTest.testCreateWrapsCheckedExceptionAndRethrows()fisheye|svn
a1)

If an exception occurs while destroying an instance, the exception must be caught by the destroy() method.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testContextualDestroyCatchesException()fisheye|svn
a2)

If the application invokes a contextual instance after it has been destroyed, the behavior is undefined.

a)

The container and portable extensions may define implementations of the Contextual interface that do not extend Bean, but it is not recommended that applications directly implement Contextual.

Section 6.1.1 - The CreationalContext interface

ca)

The interface javax.enterprise.context.spi.CreationalContext provides operations that are used by the Contextual implementation during instance creation and destruction.

d)

push() registers an incompletely initialized contextual instance with the container. A contextual instance is considered incompletely initialized until it is returned by the create() method.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testCreateReturnsSameBeanPushed()fisheye|svn
e)

release() destroys all dependent objects, as defined in Section 6.4.1, "Dependent objects", of the instance which is being destroyed, by passing each dependent object to the destroy() method of its Contextual object.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testCallingCreationalContextReleaseDestroysDependents()fisheye|svn
f)

The implementation of Contextual is not required to call push(). However, for certain bean scopes, invocation of push() between instantiation and injection helps the container minimize the use of client proxy objects (which would otherwise be required to allow circular dependencies).

g)

If Contextual.create() calls push(), it must also return the instance passed to push().

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testCreateReturnsSameBeanPushed()fisheye|svn
h)

Contextual.create() should use the given CreationalContext when obtaining contextual references to inject, as defined in Section 6.5.3, "Contextual reference for a bean", in order to ensure that any dependent objects are associated with the contextual instance that is being created.

i)

Contextual.destroy() should call release() to allow the container to destroy dependent objects of the contextual instance.

Section 6.2 - The Context interface

aa)

The javax.enterprise.context.spi.Context interface provides an operation for obtaining contextual instances with a particular scope of any contextual type.

ab)

The method getScope() returns the scope type of the context object.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testContextScopeType()fisheye|svn
ha)

When a context object is active the isActive() method returns true. Otherwise, we say that the context object is inactive and the isActive() method returns false.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testContextIsActive()fisheye|svn
DependentContextTest.testContextIsActiveWhenInvokingProducerMethod()fisheye|svn
j)

The Context.get() method may either return an existing instance of the given contextual type, or if no CreationalContext is given, return a null value, or if a CreationalContext is given, create a new instance of the given contextual type by calling Contextual.create() and return the new instance.

Coverage

org.jboss.jsr299.tck.tests.context
NormalContextTest.testGetReturnsExistingInstance()fisheye|svn
k)

The Context.get() method may either return an existing instance of the given contextual type, or if no CreationalContext is given, return a null value, or if a CreationalContext is given, create a new instance of the given contextual type by calling Contextual.create() and return the new instance.

Coverage

org.jboss.jsr299.tck.tests.context
GetWithNoCreationalContextTest.testGetWithoutCreationalContextReturnsNull()fisheye|svn
l)

The Context.get() method may either return an existing instance of the given contextual type, or if no CreationalContext is given, return a null value, or if a CreationalContext is given, create a new instance of the given contextual type by calling Contextual.create() and return the new instance.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testContextCreatesNewInstanceForInjection()fisheye|svn
org.jboss.jsr299.tck.tests.context
NormalContextTest.testGetReturnsExistingInstance()fisheye|svn
NormalContextTest.testGetWithCreationalContextReturnsNewInstance()fisheye|svn
m)

If the context object is inactive, the get() method must throw a ContextNotActiveException.

Coverage

org.jboss.jsr299.tck.tests.context
GetOnInactiveContextTest.testInvokingGetOnInactiveContextFails()fisheye|svn
na)

The get() method may not return a null value unless no CreationalContext is given, or Contextual.create() returns a null value.

Coverage

org.jboss.jsr299.tck.tests.context
GetWithNoCreationalContextTest.testGetWithoutCreationalContextReturnsNull()fisheye|svn
nb)

The get() method may not return a null value unless no CreationalContext is given, or Contextual.create() returns a null value.

Coverage

org.jboss.jsr299.tck.tests.context
NormalContextTest.testGetMayNotReturnNullUnlessContextualCreateReturnsNull()fisheye|svn
o)

The get() method may not create a new instance of the given contextual type unless a CreationalContext is given.

Coverage

org.jboss.jsr299.tck.tests.context
GetFromContextualTest.testGetMayNotCreateNewInstanceUnlessCreationalContextGiven()fisheye|svn
p)

The context object is responsible for destroying any contextual instance it creates by passing the instance to the destroy() method of the Contextual object representing the contextual type.

Coverage

org.jboss.jsr299.tck.tests.context
ContextDestroysBeansTest.testContextDestroysBeansWhenDestroyed()fisheye|svn
q)

A destroyed instance must not subsequently be returned by the get() method.

Coverage

org.jboss.jsr299.tck.tests.context
DestroyedInstanceReturnedByGetTest.testDestroyedInstanceMustNotBeReturnedByGet()fisheye|svn
r)

The context object must pass the same instance of CreationalContext to Contextual.destroy() that it passed to Contextual.create() when it created the instance.

Coverage

org.jboss.jsr299.tck.tests.context
DestroyForSameCreationalContextTest.testDestroyForSameCreationalContextOnly()fisheye|svn
DestroyForSameCreationalContext2Test.testDestroyForSameCreationalContextOnly()fisheye|svn

Section 6.3 - Normal scopes and pseudo-scopes

a)

There may be no more than one mapped instance of a context object per contextual type per thread

b)

A context may be associated with one or more threads

c)

The get() operation of the Context object for an active normal scope returns the current instance of the given contextual type.

Coverage

org.jboss.jsr299.tck.tests.context
NormalContextTest.testGetReturnsExistingInstance()fisheye|svn
d)

When a context is destroyed, all mapped instances belonging to that context are destroyed by passing them to the Contextual.destroy() method.

Coverage

org.jboss.jsr299.tck.tests.context
ContextDestroysBeansTest.testContextDestroysBeansWhenDestroyed()fisheye|svn
e)

Contexts with normal scopes must obey the following rule: Suppose beans A, B and Z all have normal scopes. Suppose A has an injection point x, and B has an injection point y. Suppose further that both x and y resolve to bean Z according to the typesafe resolution algorithm. If a is the current instance of A, and b is the current instance of B, then both a.x and b.y refer to the same instance of Z. This instance is the current instance of Z.

Coverage

org.jboss.jsr299.tck.tests.context
NormalContextTest.testSameNormalScopeBeanInjectedEverywhere()fisheye|svn
ea)

All normal scopes must be explicitly declared @NormalScope, to indicate to the container that a client proxy is required.

fa)

All pseudo-scopes must be explicitly declared @Scope, to indicate to the container that no client proxy is required.

g)

All scopes defined by this specification, except for the @Dependent pseudo-scope, are normal scopes

Section 6.4 - Dependent pseudo-scope

a)

When a bean is declared to have @Dependent scope, no injected instance of the bean is ever shared between multiple injection points.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testInstanceNotSharedBetweenInjectionPoints()fisheye|svn
b)

When a bean is declared to have @Dependent scope, any instance of the bean injected into an object that is being created by the container is bound to the lifecycle of the newly created object.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testDestroyingSimpleParentDestroysDependents()fisheye|svn
DependentContextTest.testDestroyingManagedParentDestroysDependentsOfSameBean()fisheye|svn
ca)

When a bean is declared to have @Dependent scope, when a unified EL expression in a JSF or JSP page that refers to the bean by its EL name is evaluated, at most one instance of the bean is instantiated. This instance exists to service just a single evaluation of the EL expression. It is reused if the bean EL name appears multiple times in the EL expression, but is never reused when the EL expression is evaluated again, or when another EL expression is evaluated.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testInstanceUsedForElEvaluationNotShared()fisheye|svn

When a bean is declared to have @Dependent scope, any instance of the bean that receives a producer method, producer field, disposer method or observer method invocation exists to service that invocation only

da)

Test with a producer method.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testInstanceUsedForProducerMethodNotShared()fisheye|svn
db)

Test with a producer field.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testInstanceUsedForProducerFieldNotShared()fisheye|svn
dc)

Test with a disposer method.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testInstanceUsedForDisposalMethodNotShared()fisheye|svn
dd)

Test with an observer method.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testInstanceUsedForObserverMethodNotShared()fisheye|svn
dg)

When a bean id declared to have @Dependent scope, any instance of the bean injected into method parameters of a disposer method or observer method exists to service the method invocation only (except for observer methods of container lifecycle events).

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testInstanceUsedForDisposalMethodNotShared()fisheye|svn
DependentContextTest.testInstanceUsedForObserverMethodNotShared()fisheye|svn
e)

Every invocation of the get() operation of the Context object for the @Dependent scope with a CreationalContext returns a new instance of the given bean.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testContextGetWithCreationalContextReturnsNewInstance()fisheye|svn
f)

Every invocation of the get() operation of the Context object for the @Dependent scope with no CreationalContext returns a null value.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testContextGetWithCreateFalseReturnsNull()fisheye|svn
g)

The @Dependent scope is always active.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testContextIsActiveWhenInvokingProducerField()fisheye|svn
DependentContextTest.testContextIsActiveWhenCreatingObserverMethodInstance()fisheye|svn
DependentContextTest.testContextIsActiveWhenEvaluatingElExpression()fisheye|svn
DependentContextTest.testContextIsActiveDuringBeanCreation()fisheye|svn
DependentContextTest.testContextIsActiveDuringInjection()fisheye|svn
DependentContextTest.testContextIsActive()fisheye|svn
DependentContextTest.testContextIsActiveWhenInvokingProducerMethod()fisheye|svn
DependentContextTest.testContextIsActiveWhenInvokingDisposalMethod()fisheye|svn

Section 6.4.1 - Dependent objects

Instances of interceptors or decorators with scope @Dependent are dependent objects of the bean instance they decorate.

aa)

Test with a @Dependent-scoped interceptor.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testDependentScopedInterceptorsAreDependentObjectsOfBean()fisheye|svn
ab)

Test with a @Dependent-scoped decorator.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testDependentScopedDecoratorsAreDependentObjectsOfBean()fisheye|svn

An instance of a bean with scope @Dependent injected into a field, bean constructor or initializer method is a dependent object of the bean or Java EE component class instance into which it was injected.

ga)

Test with @Dependent-scoped bean injected into field.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testInstanceNotSharedBetweenInjectionPoints()fisheye|svn
DependentContextTest.testDependentBeanIsDependentObjectOfBeanInjectedInto()fisheye|svn
gb)

Test with @Dependent-scoped bean injected into bean constructor.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testDependentBeanIsDependentObjectOfBeanInjectedInto()fisheye|svn
gc)

Test with @Dependent-scoped bean injected into initializer method.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testDependentBeanIsDependentObjectOfBeanInjectedInto()fisheye|svn
h)

An instance of a bean with scope @Dependent injected into a producer method is a dependent object of the producer method bean instance that is being produced.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testDependentsDestroyedWhenProducerMethodCompletes()fisheye|svn
i)

An instance of a bean with scope @Dependent obtained by direct invocation of an Instance is a dependent object of the instance of Instance.

Coverage

No tests exist for this assertion

Section 6.4.2 - Destruction of objects with scope @Dependent

The container must ensure that all dependent objects of a non-contextual instance of a bean or other Java EE component class are destroyed when the instance is destroyed by the container.

aaaa)

Test with a managed bean.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testDestroyingSimpleParentDestroysDependents()fisheye|svn
DependentContextTest.testDestroyingManagedParentDestroysDependentsOfSameBean()fisheye|svn
aaab)

Test with a Java EE component.

Coverage

org.jboss.jsr299.tck.tests.context.dependent.ejb
DependentContextEjbTest.testDestroyingEjbDestroysDependents()fisheye|svn
DependentContextEjbTest.testDestroyingEjbDestroysDependentSimples()fisheye|svn
bbb)

The container must ensure that all @Dependent scoped contextual instances injected into method parameters of an observer method of any container lifecycle event, as defined in Section 11.5, "Container lifecycle events", are destroyed after all observers of the BeforeShutdown event complete.

Coverage

No tests exist for this assertion

The container must ensure that all @Dependent scoped contextual instances injected into method parameters of a disposer method or observer method of any other event are destroyed when the invocation completes.

ccc)

Check disposer method

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testDependentsDestroyedWhenDisposerMethodCompletes()fisheye|svn
ccd)

Check observer method

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testDependentsDestroyedWhenObserverMethodEvaluationCompletes()fisheye|svn

The container must ensure that any @Dependent scoped contextual instance created to receive a producer method, producer field, disposer method or observer method invocation is destroyed when the invocation completes.

ddd)

Check producer method

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testDependentsDestroyedWhenProducerMethodCompletes()fisheye|svn
dde)

Check producer field

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testDependentsDestroyedWhenProducerFieldCompletes()fisheye|svn
ddf)

Check disposer method

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testDependentsDestroyedWhenDisposerMethodCompletes()fisheye|svn
ddg)

Check observer method

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testDependentsDestroyedWhenObserverMethodEvaluationCompletes()fisheye|svn
eee)

The container must ensure that all @Dependent scoped contextual instances created during evaluation of a Unified EL expression in a JSP or JSF page are destroyed when the evaluation completes.

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testDependentsDestroyedWhenElEvaluationCompletes()fisheye|svn
e)

The container is permitted to destroy any @Dependent scoped contextual instance at any time if the instance is no longer referenced by the application (excluding weak, soft and phantom references).

Section 6.4.3 - Dependent pseudo-scope and Unified EL

a)

Suppose a Unified EL expression in a JSF or JSP page refers to a bean with scope @Dependent by its EL name. Each time the EL expression is evaluated the bean is instantiated at most once, and the resulting instance is reused for every appearance of the EL name, and the resulting instance is destroyed when the evaluation completes.

Coverage

org.jboss.jsr299.tck.tests.lookup.el
ResolutionByNameTest.testQualifiedNameLookup()fisheye|svn
b)

Portable extensions that integrate with the container via Unified EL should also ensure that these rules are enforced.

Section 6.5.1 - The active context object for a scope

a)

From time to time, the container must obtain an active context object for a certain scope type. The container must search for an active instance of Context associated with the scope type. If no active context object exists for the scope type, the container throws a ContextNotActiveException.

Coverage

org.jboss.jsr299.tck.tests.context
ContextTest.testGetContextWithNoRegisteredContextsFails()fisheye|svn
b)

If more than one active context object exists for the given scope type, the container must throw an IllegalStateException.

Coverage

org.jboss.jsr299.tck.tests.context
ContextTest.testGetContextWithTooManyActiveContextsFails()fisheye|svn

Section 6.5.2 - Contextual instance of a bean

a)

From time to time, the container must obtain a contextual instance of a bean. The container must obtain the active context object for the bean scope, then obtain an instance of the bean by calling Context.get(), passing the Bean instance representing the bean and an instance of CreationalContext.

Coverage

org.jboss.jsr299.tck.tests.lookup.el
ResolutionByNameTest.testContextCreatesNewInstanceForInjection()fisheye|svn
b)

From time to time, the container attempts to obtain a contextual instance of a bean that already exists, without creating a new contextual instance. The container must determine if the scope of the bean is active and if it is, obtain the active context object for the bean scope, then attempt to obtain an instance of the bean by calling Context.get(), passing the Bean instance representing the bean without passing any instance of CreationalContext.

Coverage

org.jboss.jsr299.tck.tests.lookup.el
ResolutionByNameTest.testContextCreatesNewInstanceForInjection()fisheye|svn
c)

If the scope is not active, or if Context.get() returns a null value, there is no contextual instance that already exists.

e)

For a custom implementation of the Bean interface defined in Section 11.1, "The Bean interface", the container calls getScope() to determine the bean scope.

Coverage

org.jboss.jsr299.tck.tests.definition.bean.custom
CustomBeanImplementationTest.testGetScopeTypeCalled()fisheye|svn

Section 6.5.3 - Contextual reference for a bean

a0)

Contextual references must be obtained with a given CreationalContext, allowing any instance of scope @Dependent that is created to be later destroyed.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testContextualDestroyDisposesWhenNecessary()fisheye|svn
a)

If the bean has a normal scope and the given bean type cannot be proxied by the container, as defined in Section 5.4.1, "Unproxyable bean types", the container throws an UnproxyableResolutionException.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle.unproxyable
UnproxyableManagedBeanTest.testNormalScopedUnproxyableBeanThrowsException()fisheye|svn
b)

If the bean has a normal scope, then the contextual reference for the bean is a client proxy, as defined in Section 5.4, "Client proxies", created by the container, that implements the given bean type and all bean types of the bean which are Java interfaces.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle
EnterpriseBeanLifecycleTest.testCreateSFSB()fisheye|svn
c)

If the bean has a pseudo-scope, the container must obtain a contextual instance of the bean. If the bean has scope @Dependent, the container must associate it with the CreationalContext.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testContextualDestroyDisposesWhenNecessary()fisheye|svn
d)

The container must ensure that every injection point of type InjectionPoint and qualifier @Default of any dependent object instantiated during this process receives an instance of InjectionPoint representing the injection point into which the dependent object will be injected, or a null value if it is not being injected into any injection point.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectionPointTest.testGetBean()fisheye|svn

Section 6.5.4 - Contextual reference validity

a)

Any reference to a bean with a normal scope is valid as long as the application maintains a hard reference to it. However, it may only be invoked when the context associated with the normal scope is active. If it is invoked when the context is inactive, a ContextNotActiveException is thrown by the container.

Coverage

org.jboss.jsr299.tck.tests.lookup.clientProxy
ClientProxyTest.testInactiveScope()fisheye|svn
b)

Any reference to a bean with a pseudo-scope (such as @Dependent) is valid until the bean instance to which it refers is destroyed. It may be invoked even if the context associated with the pseudo-scope is not active. If the application invokes a method of a reference to an instance that has already been destroyed, the behavior is undefined.

Section 6.5.5 - Injectable references

a)

From time to time, the container must obtain an injectable reference for an injection point. The container must identify a bean according to the rules defined in Section 5.2, "Typesafe resolution" and resolving ambiguities according to Section 5.2.1, "Unsatisfied and ambiguous dependencies", then obtain a contextual reference for this bean and the type of the injection point according to Section 6.5.3, "Contextual reference for a bean".

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectableReferenceTest.testGetInjectableReferenceOnBeanManager()fisheye|svn
b)

For certain combinations of scopes, the container is permitted to optimize the procedure for obtaining an injectable reference for an injection point - the container is permitted to directly inject a contextual instance of the bean, as defined in Section 6.5.2, "Contextual instance of a bean", and if an incompletely initialized instance of the bean is registered with the current CreationalContext, as defined in Section 6.1, "The Contextual interface", the container is permitted to directly inject this instance.

Section 6.5.6 - Injectable reference validity

a)

Injectable references to a bean must respect the rules of contextual reference validity, with the following exceptions - a reference to a bean injected into a field, bean constructor or initializer method is only valid until the object into which it was injected is destroyed, a reference to a bean injected into a producer method is only valid until the producer method bean instance that is being produced is destroyed, and a reference to a bean injected into a disposer method or observer method is only valid until the invocation of the method completes.

Coverage

No tests exist for this assertion

b)

The application should not invoke a method of an invalid injected reference. If the application invokes a method of an invalid injected reference, the behavior is undefined.

Section 6.6 - Passivation and passivating scopes

The following assertion is not made explicitly by the spec, however it is implied a)

Test that passivation occurs.

Coverage

org.jboss.jsr299.tck.tests.context.passivating
PassivatingContextTest.testPassivationOccurs()fisheye|svn

Section 6.6.1 - Passivation capable beans

a)

As defined by the EJB specification, all stateful session beans are passivation capable. Stateless and singleton session beans are not passivation capable.

A managed bean is passivation capable if and only if the bean class is serializable and all interceptors and decorators of the bean are serializable.

ba)

Tests with a serializable bean class.

Coverage

org.jboss.jsr299.tck.tests.context.passivating
PassivatingContextTest.testManagedBeanWithSerializableImplementationClassOK()fisheye|svn
bb)

Tests with a serializable interceptor.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.broken.managedBeanWithNonSerializableInterceptorClass
ManagedBeanWithNonSerializableInterceptorClassTest.testManagedBeanWithNonSerializableInterceptorClassNotOK()fisheye|svn
org.jboss.jsr299.tck.tests.context.passivating
PassivatingContextTest.testManagedBeanWithSerializableInterceptorClassOK()fisheye|svn
bc)

Tests with a serializable decorator.

Coverage

org.jboss.jsr299.tck.tests.context.passivating
PassivatingContextTest.testManagedBeanWithSerializableDecoratorOK()fisheye|svn
c)

A producer method is passivation capable if and only if it never returns a value which is not passivation capable at runtime.

d)

A producer field is passivation capable if and only if it never refers to a value which is not passivation capable at runtime.

A producer method is passivation capable if and only if it never returns a value which is not passivation capable at runtime.

caa)

Test that a producer method with a primitive return type is passivation capable.

A test exists for this untestable assertion!
ca)

Test that a producer method with a serializable return type is passivation capable.

Coverage

org.jboss.jsr299.tck.tests.context.passivating
PassivatingContextTest.testPassivationCapableProducerMethodIsOK()fisheye|svn

A producer field is passivation capable if and only if it never refers to a value which is not passivation capable at runtime.

daa)

Test that a producer field with a primitive type is passivation capable.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.producer
ProducerWithPrimitiveFieldTypePassivationTest.testProducerFieldWithPrimitiveType()fisheye|svn
da)

Test that a producer field with a serializable type is passivation capable.

Coverage

org.jboss.jsr299.tck.tests.context.passivating
PassivatingContextTest.testPassivationCapableProducerFieldIsOK()fisheye|svn
ea)

A custom implementation of Bean is passivation capable if it implements the interface PassivationCapable.

Coverage

No tests exist for this assertion

f)

An implementation of Contextual that is not a bean is passivation capable if it implements both PassivationCapable and Serializable.

Coverage

No tests exist for this assertion

g)

The getId() method of the PassivationCapable implementation must return a value that uniquely identifies the instance of Bean or Contextual.

h)

The getId() method of the PassivationCapable implementation must return a value that uniquely identifies the instance of Bean or Contextual. It is recommended that the string contain the package name of the class that implements Bean or Contextual.

Section 6.6.2 - Passivation capable dependencies

a)

The container must guarantee that all session beans are passivation capable dependencies.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle
EnterpriseBeanLifecycleTest.testSerializeSFSB()fisheye|svn
b)

The container must guarantee that all beans with normal scope are passivation capable dependencies.

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testSerializeRequestScoped()fisheye|svn
SimpleBeanLifecycleTest.testSerializeSessionScoped()fisheye|svn
c)

The container must guarantee that all passivation capable beans with scope @Dependent are passivation capable dependencies.

Coverage

org.jboss.jsr299.tck.tests.context.passivating
PassivatingContextTest.testInjectionOfDependentPrimitiveProductIntoNormalBean()fisheye|svn
PassivatingContextTest.testInjectionOfDependentSerializableProductIntoNormalBean()fisheye|svn
da)

The container must guarantee that all resources are passivation capable dependencies.

Coverage

No tests exist for this assertion

e)

The container must guarantee that the built-in beans of type Instance, Event, InjectionPoint and BeanManager are passivation capable dependencies.

Coverage

org.jboss.jsr299.tck.tests.event.implicit
ImplicitEventTest.testImplicitEventIsPassivationCapable()fisheye|svn
fa)

A custom implementation of Bean is a passivation capable dependency if it implements PassivationCapable or if getScope() returns a normal scope type.

Coverage

No tests exist for this assertion

Section 6.6.3 - Passivating scopes

A passivating scope requires that beans with the scope are passivation capable, and implementations of Contextual passed to any context object for the scope are passivation capable.

a)

Test that a bean with the scope is passivation capable.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.broken.nonPassivationCapableManagedBeanHasPassivatingScope
NonPassivationManagedBeanHasPassivatingScopeTest.testSimpleWebBeanWithNonSerializableImplementationClassFails()fisheye|svn
org.jboss.jsr299.tck.tests.context.passivating
PassivatingContextTest.testManagedBeanWithSerializableImplementationClassOK()fisheye|svn
b)

Test that an implementation of Contextual passed to the context object for the scope is passivation capable.

b)

Passivating scopes must be explicitly declared @NormalScope(passivating=true).

Section 6.6.4 - Validation of passivation capable beans and dependencies

If a managed bean which declares a passivating scope is not passivation capable, then the container automatically detects the problem and treats it as a deployment problem.

a)

Test managed bean.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.broken.passivation
PassivationCapabilityErrorCausedByExtensionDetectedTest.test()fisheye|svn
org.jboss.jsr299.tck.tests.deployment.lifecycle.broken.passivatingScope
AddingPassivatingScopeTest.testAddingScopeType()fisheye|svn
org.jboss.jsr299.tck.tests.context.passivating.broken.nonPassivationCapableManagedBeanHasPassivatingScope
NonPassivationManagedBeanHasPassivatingScopeTest.testSimpleWebBeanWithNonSerializableImplementationClassFails()fisheye|svn
b)

Test stateful session bean.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.broken.sessionBeanWithPassivatingScopeNotSerializable
NonPassivationCapableEjbWithPassivatingScopeTest.testDeployment()fisheye|svn
aa)

If a managed bean which declares a passivating scope has a non-transient injected field that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem.

Coverage

org.jboss.jsr299.tck.tests.context.passivating
PassivatingContextTest.testBeanWithNonSerializableImplementationInjectedIntoTransientFieldOK()fisheye|svn
org.jboss.jsr299.tck.tests.context.passivating.broken.passivatingManagedBeanWithNonPassivatingInjcetedField
PassivatingManagedBeanWithNonPassivatingInjcetedFieldTest.testBeanWithNonSerializableImplementationInjectedIntoNonTransientFieldOfBeanWithPassivatingScopeFails()fisheye|svn

If a managed bean which declares a passivating scope has an interceptor or decorator with a non-transient injected field that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem.

aac)

Test interceptor with injected field.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.broken.interceptorWithNonPassivatingInjectedField
PassivationCapableBeanWithNonPassivatingInterceptorTest.testPassivationCapableBeanWithNonPassivatingInterceptorFails()fisheye|svn
aaf)

Test decorator with injected field.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.broken.decoratorWithNonPassivatingInjectedField
DecoratorWithNonPassivatingInjectedFieldTest.testPassivationCapableBeanWithNonPassivatingDecoratorInjectedFieldFails()fisheye|svn
ba)

If a stateful session bean which declares a passivating scope has a non-transient injected field that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.broken.unserializableSimpleInjectedIntoPassivatingEnterpriseBean
UnserializableSimpleInjectedIntoPassivatingEnterpriseBeanTest.testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoStatefulSessionBeanFails()fisheye|svn

If a stateful session bean has an interceptor or decorator with a non-transient injected field that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem.

bda)

Test an interceptor with an injected field.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.broken.enterpriseBeanWithNonPassivatingInjectedFieldInInterceptor
EnterpriseBeanWithNonPassivatingInjectedFieldInInterceptorTest.testSessionBeanWithNonPassivatingInjectedFieldInInterceptorFails()fisheye|svn
bdd)

Test a decorator with an injected field.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.broken.enterpriseBeanWithNonPassivatingInjectedFieldInDecorator
EnterpriseBeanWithNonPassivatingInjectedFieldInDecoratorTest.testSessionBeanWithNonPassivatingInjectedFieldInDecoratorFails()fisheye|svn
ca)

If a producer method declares a passivating scope and has a return type that is declared final and does not implement or extend Serializable then the container automatically detects the problem and treats it as a deployment problem.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.broken.nonPassivationCapableProducerMethod
NonPassivationCapableProducerMethodTest.testNonPassivationCapableProducerMethodNotOk()fisheye|svn
ea)

If a producer method declares a passivating scope and doesn't only return Serializable types at runtime, then the container must throw an IllegalProductException.

Coverage

org.jboss.jsr299.tck.tests.context.passivating
PassivatingContextTest.testPassivatingScopeProducerMethodReturnsUnserializableObjectNotOk()fisheye|svn
d)

If a producer field declares a passivating scope and has a type that is declared final and does not implement or extend Serializable then the container automatically detects the problem and treats it as a deployment problem.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.broken.nonPassivationCapableProducerField
NonPassivationCapableProducerFieldTest.testNonPassivationCapableProducerFieldNotOk()fisheye|svn
eb)

If a producer field declares a passivating scope and doesn't only contain Serializable values at runtime then the container must throw anIllegalProductException.

Coverage

org.jboss.jsr299.tck.tests.context.passivating
PassivatingContextTest.testNonSerializableProducerFieldDeclaredPassivatingThrowsIllegalProductException()fisheye|svn

If a producer method or field of scope @Dependent returns an unserializable object for injection into an injection point that requires a passivation capable dependency, the container must throw an IllegalProductException

fab)

Test for a runtime exception with a producer method.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.broken.dependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulSessionBean
EnterpriseBeanWithIllegalDependencyTest.test()fisheye|svn
fbb)

Test for a runtime exception with a producer field.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.broken.dependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoStatefulSessionBean
EnterpriseBeanWithIllegalDependencyTest.test()fisheye|svn

For a custom implementation of Bean, the container calls getInjectionPoints() to determine the injection points, and InjectionPoint.isTransient() to determine whether the injected point is a transient field.

ga)

Test calling getInjectionPoints().

Coverage

org.jboss.jsr299.tck.tests.definition.bean.custom
CustomBeanImplementationTest.testGetInjectionPointsCalled()fisheye|svn
gb)

Test calling InjectionPoint.isTransient().

Coverage

org.jboss.jsr299.tck.tests.definition.bean.custom
CustomBeanImplementationTest.testGetInjectionPointsCalled()fisheye|svn

If a bean which declares a passivating scope type has a decorator or interceptor which is not a passivation capable dependency, the container automatically detects the problem and treats it as a deployment problem.

ha)

Test a bean with decorator which is not a passivation capable dependency.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.broken.managedBeanWithNonPassivatingDecorator
ManagedBeanWithNonPassivatingDecoratorTest.testManagedBeanWithNonPassivatingDecoratorFails()fisheye|svn
hb)

Test a stateful session bean with decorator which is not a passivation capable dependency.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.broken.enterpriseBeanWithNonPassivatingDecorator
EnterpriseBeanWithNonPassivatingDecoratorTest.testEnterpriseBeanWithNonPassivatingDecoratorFails()fisheye|svn
hc)

Test a bean with interceptor which is not a passivation capable dependency.

Coverage

No tests exist for this assertion

hd)

Test a stateful session bean with interceptor which is not a passivation capable dependency.

Coverage

No tests exist for this assertion

The following assertion is not made explicitly by the spec, however it is implied ia)

Managed bean which declares a passivating scope may have bean constructor parameter or initializer method parameter that does not resolve to a passivation capable dependency.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.injection
NonPassivatingInjectionIntoPassivatingBeanTest.test()fisheye|svn
The following assertion is not made explicitly by the spec, however it is implied ib)

Stateful session bean which declares a passivating scope may have bean constructor parameter or initializer method parameter that does not resolve to a passivation capable dependency.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.injection
NonPassivatingInjectionIntoPassivatingBeanTest.test()fisheye|svn
The following assertion is not made explicitly by the spec, however it is implied j)

Stateful session bean which does not declare a passivating scope needn't be passivation capable.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.enterprise
NonPassivationCapableSessionBeanTest.testDeployment()fisheye|svn
The following assertion is not made explicitly by the spec, however it is implied k)

Passivation capable interceptor with non-passivation capable dependencies is allowed unless it intercepts a bean declaring passivation scope.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.validation
InterceptorWithNonPassivationCapableDependenciesTest.test()fisheye|svn
The following assertion is not made explicitly by the spec, however it is implied l)

Passivation capable decorator with non-passivation capable dependencies is allowed unless it decorates a bean declaring passivation scope.

Coverage

org.jboss.jsr299.tck.tests.context.passivating.validation
DecoratorWithNonPassivationCapableDependenciesTest.testDeploymentValid()fisheye|svn

Section 6.7 - Context management for built-in scopes

The built-in request and application context objects are active during servlet, web service and EJB invocations, and the built in session and request context objects are active during servlet and web service invocations. For other kinds of invocations, a portable extension may define a custom context object for any or all of the built-in scopes.

Section 6.7.1 - Request context lifecycle

aa)

The request scope is active during the service() method of any servlet in the web application, during the doFilter() method of any servlet filter and when the container calls any ServletRequestListener or AsyncListener.

Coverage

org.jboss.jsr299.tck.tests.context.request
RequestContextTest.testRequestScopeActiveDuringServiceMethod()fisheye|svn
ab)

The request scope is active during the service() method of any servlet in the web application, during the doFilter() method of any servlet filter and when the container calls any ServletRequestListener or AsyncListener.

Coverage

org.jboss.jsr299.tck.tests.context.request
RequestContextTest.testRequestScopeActiveDuringServletFilter()fisheye|svn
c)

The request scope is active during any Java EE web service invocation.

Coverage

org.jboss.jsr299.tck.tests.context.request.jaxrs
RequestContextTest.testRequestScopeActiveDuringWebServiceInvocation()fisheye|svn

The request scope is active during any remote method invocation of any EJB, during any asynchronous method invocation of any EJB, during any call to an EJB timeout method and during message delivery to any EJB message-driven bean.

ga)

Test the request scope is active during a remote method invocation of any EJB.

Coverage

org.jboss.jsr299.tck.tests.context.request.ejb
EJBRequestContextTest.testRequestScopeActiveDuringRemoteCallToEjb()fisheye|svn
gb)

Test the request scope is active during any asynchronous method invocation of any EJB.

Coverage

org.jboss.jsr299.tck.tests.context.request.ejb
EJBRequestContextTest.testRequestScopeActiveDuringAsyncCallToEjb()fisheye|svn
gc)

Test the request scope is active during any call to an EJB timeout method.

Coverage

org.jboss.jsr299.tck.tests.context.request.ejb
EJBRequestContextTest.testRequestScopeActiveDuringCallToEjbTimeoutMethod()fisheye|svn
gd)

Test the request scope is active during message delivery to any EJB message-driven bean.

Coverage

org.jboss.jsr299.tck.tests.context.jms
MessageDrivenBeanContextTest.testRequestScopeActiveDuringMessageDelivery()fisheye|svn
ge)

The request scope is active during any message delivery to a MessageListener for a JMS topic or queue obtained from the Java EE component environment.

Coverage

org.jboss.jsr299.tck.tests.context.jms
MessageListenerContextTest.testRequestScopeActiveDuringMessageDelivery()fisheye|svn

The request context is destroyed at the end of the servlet request, after the service() method and all doFilter() methods, and all requestDestroyed() and onComplete() notifications return.

baa)

Test the request context is destroyed at the end of the servlet request, after the service() method.

Coverage

org.jboss.jsr299.tck.tests.context.request
RequestContextTest.testRequestScopeIsDestroyedAfterServletRequest()fisheye|svn
bba)

Test the request context is destroyed after all doFilter() methods, and all requestDestroyed() and onComplete() notifications return.

Coverage

No tests exist for this assertion

d)

The request context is destroyed after the web service invocation completes.

Coverage

org.jboss.jsr299.tck.tests.context.request.jaxrs
RequestContextTest.testRequestScopeActiveDuringWebServiceInvocation()fisheye|svn

The request context is destroyed after the EJB remote method invocation, asynchronous method invocation, timeout or message delivery completes.

ha)

Test the request context is destroyed after an EJB remote method invocation.

Coverage

org.jboss.jsr299.tck.tests.context.request.ejb
EJBRequestContextTest.testRequestScopeActiveDuringRemoteCallToEjb()fisheye|svn
hb)

Test the request context is destroyed after an EJB asynchronous method invocation.

Coverage

org.jboss.jsr299.tck.tests.context.request.ejb
EJBRequestContextTest.testRequestScopeActiveDuringAsyncCallToEjb()fisheye|svn
hc)

Test the request context is destroyed after the EJB timeout.

Coverage

org.jboss.jsr299.tck.tests.context.request.ejb
EJBRequestContextTest.testRequestScopeDestroyedAfterCallToEjbTimeoutMethod()fisheye|svn
hd)

Test the request context is destroyed after the message delivery completes.

Coverage

org.jboss.jsr299.tck.tests.context.jms
MessageDrivenBeanContextTest.testRequestScopeActiveDuringMessageDelivery()fisheye|svn
i)

The request context is destroyed after the message delivery to the MessageListener completes.

Coverage

org.jboss.jsr299.tck.tests.context.jms
MessageListenerContextTest.testRequestScopeActiveDuringMessageDelivery()fisheye|svn

An event with qualifier @Initialized(RequestScoped.class) is fired when the request context is initialized and an event with qualifier @Destroyed(RequestScoped.class) when the request context is destroyed.

ja)

The event payload is the ServletRequestEvent if the context is initialized or destroyed due to a servlet request.

Coverage

org.jboss.jsr299.tck.tests.context.request.event
RequestScopeEventTest.test()fisheye|svn
jb)

The event payload is the ServletRequestEvent if the context is initialized or destroyed due to a web service invocation.

Coverage

org.jboss.jsr299.tck.tests.context.request.jaxrs
RequestContextTest.testRequestScopeActiveDuringWebServiceInvocation()fisheye|svn
jc)

The event payload is the ??? if the context is initialized or destroyed due to a EJB remote method invocation, asynchronous method invocation, timeout or message delivery.

jd)

The event payload is the ??? if the context is initialized or destroyed due to a message delivery to a MessageListener.

Section 6.7.2 - Session context lifecycle

aa)

The session scope is active during the service() method of any servlet in the web application , during the doFilter() method of any servlet filter and when the container calls any HttpSessionListener, AsyncListener or ServletRequestListener.

Coverage

org.jboss.jsr299.tck.tests.context.session
SessionContextTest.testSessionScopeActiveDuringServiceMethod()fisheye|svn
ab)

The session scope is active during the service() method of any servlet in the web application, during the doFilter() method of any servlet filter and when the container calls any HttpSessionListener, AsyncListener or ServletRequestListener.

Coverage

org.jboss.jsr299.tck.tests.context.session
SessionContextTest.testSessionScopeActiveDuringDoFilterMethod()fisheye|svn
b)

The session context is shared between all servlet requests that occur in the same HTTP servlet session.

Coverage

org.jboss.jsr299.tck.tests.context.session
SessionContextTest.testSessionContextSharedBetweenServletRequestsInSameHttpSession()fisheye|svn
ca)

The session context is destroyed when the HTTPSession times out, after all HttpSessionListeners have been called, and at the very end of any request in which invalidate() was called, after all filters and ServletRequestListeners have been called.

Coverage

org.jboss.jsr299.tck.tests.context.session
SessionContextTest.testSessionContextDestroyedWhenHttpSessionInvalidated()fisheye|svn
cb)

The session context is destroyed when the HTTPSession times out, after all HttpSessionListeners have been called, and at the very end of any request in which invalidate() was called, after all filters and ServletRequestListeners have been called.

Coverage

org.jboss.jsr299.tck.tests.context.session
SessionContextTest.testSessionContextDestroyedWhenHttpSessionTimesOut()fisheye|svn
cd)

The session context is destroyed when the HTTPSession times out, after all HttpSessionListeners have been called, and at the very end of any request in which invalidate() was called, after all filters and ServletRequestListeners have been called.

Coverage

org.jboss.jsr299.tck.tests.context.session.event
SessionScopeEventTest.test()fisheye|svn
da)

An event with the HttpSessionEvent as payload and with qualifier @Initialized(SessionScoped.class) is fired when the session context is initialized.

Coverage

org.jboss.jsr299.tck.tests.context.session.event
SessionScopeEventTest.test()fisheye|svn
db)

An event with the HttpSessionEvent as payload and with qualifier @Destroyed(SessionScoped.class) is fired when the session context is destroyed.

Coverage

org.jboss.jsr299.tck.tests.context.session.event
SessionScopeEventTest.test()fisheye|svn

Section 6.7.3 - Application context lifecycle

The application scope is active during the service() method of any servlet in the web application, during the doFilter() method of any servlet filter and when the container calls any ServletContextListener, HttpSessionListener, AsyncListener or ServletRequestListener.

aa)

Check service method

Coverage

org.jboss.jsr299.tck.tests.context.application
ApplicationContextTest.testApplicationScopeActiveDuringServiceMethod()fisheye|svn
ab)

Check filter.

Coverage

org.jboss.jsr299.tck.tests.context.application
ApplicationContextTest.testApplicationScopeActiveDuringDoFilterMethod()fisheye|svn
ac)

Check ServletContextListener.

Coverage

org.jboss.jsr299.tck.tests.context.application
ApplicationContextTest.testApplicationScopeActiveDuringServletContextListenerInvocation()fisheye|svn
ad)

Check HttpSessionListener

Coverage

org.jboss.jsr299.tck.tests.context.application
ApplicationContextTest.testApplicationScopeActiveDuringHttpSessionListenerInvocation()fisheye|svn
ae)

Check AsyncListener

Coverage

No tests exist for this assertion

af)

Check ServletRequestListener

Coverage

org.jboss.jsr299.tck.tests.context.application
ApplicationContextTest.testApplicationScopeActiveDuringServletRequestListenerInvocation()fisheye|svn
b)

The application scope is active during any Java EE web service invocation.

Coverage

No tests exist for this assertion

The application scope is also active during any remote method invocation of any EJB, during any asynchronous method invocation of any EJB, during any call to an EJB timeout method and during message delivery to any EJB message-driven bean.

da)

Test remote method invocation

Coverage

No tests exist for this assertion

db)

Test asynchronous method invocation

Coverage

No tests exist for this assertion

dc)

Test EJB timeout method

Coverage

org.jboss.jsr299.tck.tests.context.application.ejb
ApplicationContextSharedTest.testApplicationScopeActiveDuringCallToEjbTimeoutMethod()fisheye|svn
dd)

Test message delivery to any EJB message-driven bean.

Coverage

org.jboss.jsr299.tck.tests.context.jms
MessageDrivenBeanContextTest.testRequestScopeActiveDuringMessageDelivery()fisheye|svn

The application scope is active during any message delivery to a MessageListener for a JMS topic or queue obtained from the Java EE component environment.

de)

Test JMS topic

Coverage

org.jboss.jsr299.tck.tests.context.jms
MessageListenerContextTest.testRequestScopeActiveDuringMessageDelivery()fisheye|svn
df)

Test JMS queue

Coverage

org.jboss.jsr299.tck.tests.context.jms
MessageListenerContextTest.testRequestScopeActiveDuringMessageDelivery()fisheye|svn

The application scope is active when the disposer method or @PreDestroy callback of any bean with any normal scope other than @ApplicationScoped is called.

dg)

Test disposer method

Coverage

No tests exist for this assertion

dh)

Test @PreDestroy method

Coverage

No tests exist for this assertion

e)

The application context is shared between all servlet requests, asynchronous observer method notifications, web service invocations, EJB remote method invocations, EJB asynchronous method invocations, EJB timeouts and message deliveries to message driven beans that execute within the same application.

Coverage

org.jboss.jsr299.tck.tests.context.application.ejb
ApplicationContextSharedTest.testApplicationContextShared()fisheye|svn
org.jboss.jsr299.tck.tests.context.application
ApplicationContextTest.testApplicationContextSharedBetweenServletRequests()fisheye|svn
ApplicationContextTest.testApplicationContextSharedBetweenJaxRsRequests()fisheye|svn
f)

The application context is destroyed when the application is undeployed.

Coverage

No tests exist for this assertion

An event with qualifier @Initialized(ApplicationScoped.class) is fired when the application context is initialized and an event with qualifier @Destroyed(ApplicationScoped.class) is fired when the application is destroyed.

ga)

The event payload is the ServletContextEvent if the application is a web application deployed to a Servlet container.

Coverage

org.jboss.jsr299.tck.tests.context.application.event
ApplicationScopeEventTest.testServletContextInitializedInvoked()fisheye|svn
ApplicationScopeEventMultiWarTest.testDeployment()fisheye|svn
gb)

the ??? in ???

Coverage

No tests exist for this assertion

Section 6.7.4 - Conversation context lifecycle

The conversation scope is active during all Servlet requests.

a)

Test JSF request.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testConversationActiveDuringNonFacesRequest()fisheye|svn
aa)

Test non-JSF servlet request.

Coverage

org.jboss.jsr299.tck.tests.context.conversation.servlet
ServletConversationTest.testTransientConversation()fisheye|svn
ServletConversationTest.testLongRunningConversation()fisheye|svn
ServletConversationTest.testPost()fisheye|svn
ba)

An event with the ServletRequestEvent as the payload and with qualifier @Initialized(ConversationContext.class) is fired when the conversation context is initialized.

Coverage

org.jboss.jsr299.tck.tests.context.conversation.event
LongRunningConversationLifecycleEventTest.testLifecycleEventFiredForLongRunningConversation()fisheye|svn
TransientConversationLifecycleEventTest.testLifecycleEventFiredForTransientConversation()fisheye|svn
bb)

An event with the ServletRequestEvent as the payload and with qualifier @Destroyed(ConversationContext.class) when the conversation context is destroyed.

Coverage

org.jboss.jsr299.tck.tests.context.conversation.event
LongRunningConversationLifecycleEventTest.testLifecycleEventFiredForLongRunningConversation()fisheye|svn
TransientConversationLifecycleEventTest.testLifecycleEventFiredForTransientConversation()fisheye|svn

Any Servlet request has exactly one associated conversation.

c)

Test JSF request.

Coverage

No tests exist for this assertion

ca)

Test non-JSF request.

Coverage

No tests exist for this assertion

The conversation associated with a Servlet request is determined at the beginning of the request before calling any service() method of any servlet in the web application, calling the doFilter() method of any servlet filter in the web application and before the container calls any ServletRequestListener or AsyncListener in the web application.

da)

Test service() method of a servlet.

Coverage

No tests exist for this assertion

db)

Test doFilter() method of a servlet filter.

Coverage

No tests exist for this assertion

dc)

Test ServletRequestListener.

Coverage

No tests exist for this assertion

dd)

Test AsyncListener.

Coverage

No tests exist for this assertion

e)

By default, a conversation is transient.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testTransientConversationHasNullId()fisheye|svn
f)

A transient conversation may be marked long-running by calling Conversation.begin()

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testConversationBeginMakesConversationLongRunning()fisheye|svn
g)

A long-running conversation may be marked transient by calling Conversation.end()

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testConversationEndMakesConversationTransient()fisheye|svn
ha)

All long-running conversations have a string-valued unique identifier, which may be set by the application when the conversation is marked long-running, or generated by the container

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testConversationIdMayBeSetByApplication()fisheye|svn
hb)

All long-running conversations have a string-valued unique identifier, which may be set by the application when the conversation is marked long-running, or generated by the container

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testConversationIdSetByContainerIsUnique()fisheye|svn
ClientConversationContextTest.testConversationIdMayBeSetByContainer()fisheye|svn
j)

If the conversation associated with the current Servlet request is in the transient state at the end of a Servlet request, it is destroyed, and the conversation context is also destroyed.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testTransientConversationInstancesDestroyedAtRequestEnd()fisheye|svn
k)

If the conversation associated with the current Servlet request is in the long-running state at the end of a Servlet request, it is not destroyed.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testLongRunningConversationInstancesNotDestroyedAtRequestEnd()fisheye|svn
n)

The long-running conversation associated with a request may be propagated to any Servlet request via use of a request parameter named cid containing the unique identifier of the conversation. In this case, the application must manage this request parameter.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ManualCidPropagationTest.testManualCidPropagation()fisheye|svn
l)

The long-running conversation context associated with a request that renders a JSF view is automatically propagated to any faces request (JSF form submission) that originates from that rendered page.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
LongRunningConversationPropagatedByFacesContextTest.testConversationPropagated()fisheye|svn
m)

The long-running conversation context associated with a request that results in a JSF redirect (via a navigation rule) is automatically propagated to the resulting non-faces request, and to any other subsequent request to the same URL. This is accomplished via use of a request parameter named cid containing the unique identifier of the conversation.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
LongRunningConversationPropagatedByFacesContextTest.testConversationPropagatedOverRedirect()fisheye|svn

When no conversation is propagated to a Servlet request, or if a request parameter named conversationPropagation has the value none the request is associated with a new transient conversation.

o)

The request is associated with a new transient conversation.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testConversationIdSetByContainerIsUnique()fisheye|svn
oa)

Test request parameter named conversationPropagation.

Coverage

No tests exist for this assertion

p)

All long-running conversations are scoped to a particular HTTP servlet session and may not cross session boundaries.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testConversationsDontCrossSessionBoundary1()fisheye|svn
ClientConversationContextTest.testConversationsDontCrossSessionBoundary2()fisheye|svn
qa)

When the HTTP servlet session is invalidated, all long-running conversation contexts created during the current session are destroyed, after the servlet service() method completes.

Coverage

org.jboss.jsr299.tck.tests.context.conversation.servlet
ServletConversationTest.testInvalidatingSessionDestroysConversation()fisheye|svn
org.jboss.jsr299.tck.tests.context.conversation
InvalidatingSessionDestroysConversationTest.testInvalidatingSessionDestroysConversation()fisheye|svn
r)

The container is permitted to arbitrarily destroy any long-running conversation that is associated with no current JSF request, in order to conserve resources

ta)

The conversation timeout, which may be specified by calling Conversation.setTimeout() is a hint to the container that a conversation should not be destroyed if it has been active within the last given interval in milliseconds.

tb)

If the propagated conversation cannot be restored, the container must associate the request with a new transient conversation and throw an exception of type javax.enterprise.context.NonexistentConversationException.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testNonexistentConversationExceptionThrown()fisheye|svn
ua)

The container ensures that a long-running conversation may be associated with at most one request at a time, by blocking or rejecting concurrent requests. If the container rejects a request, it must associate the request with a new transient conversation and throw an exception of type javax.enterprise.context.BusyConversationException.

Coverage

No tests exist for this assertion

Section 6.7.5 - The Conversation interface

The container provides a built-in bean with bean type Conversation, scope @RequestScoped, and qualifier @Default, named javax.enterprise.context.conversation.

iaa)

Test the bean type is correct.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testBeanWithRequestScope()fisheye|svn
ib)

Test the scope is correct.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testBeanWithRequestScope()fisheye|svn
id)

Test the qualifier is correct.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testBeanWithDefaultQualifier()fisheye|svn
ie)

Test the bean name is correct.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testBeanWithNameJavaxEnterpriseContextConversation()fisheye|svn
j)

begin() marks the current transient conversation long-running. A conversation identifier may, optionally, be specified. If no conversation identifier is specified, an identifier is generated by the container.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testConversationIdMayBeSetByApplication()fisheye|svn
ClientConversationContextTest.testConversationIdMayBeSetByContainer()fisheye|svn
k)

end() marks the current long-running conversation transient.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testConversationEndMakesConversationTransient()fisheye|svn
l)

getId() returns the identifier of the current long-running conversation, or a null value if the current conversation is transient.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testTransientConversationHasNullId()fisheye|svn
m)

getTimeout() returns the timeout, in milliseconds, of the current conversation.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testConversationHasDefaultTimeout()fisheye|svn
ClientConversationContextTest.testSetConversationTimeoutOverride()fisheye|svn
n)

setTimeout() sets the timeout of the current conversation.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testSetConversationTimeoutOverride()fisheye|svn
o)

isTransient() returns true if the conversation is marked transient, or false if it is marked long-running.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testConversationEndMakesConversationTransient()fisheye|svn
p)

If any method of Conversation is called when the conversation scope is not active, a ContextNotActiveException is thrown.

Coverage

No tests exist for this assertion

q)

If end() is called, and the current conversation is marked transient, an IllegalStateException is thrown.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testEndTransientConversationThrowsException()fisheye|svn
r)

If begin() is called, and the current conversation is already marked long-running, an IllegalStateException is thrown.

Coverage

org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest.testBeginAlreadyLongRunningConversationThrowsException()fisheye|svn
s)

If begin() is called with an explicit conversation identifier, and a long-running conversation with that identifier already exists, an IllegalArgumentException is thrown.

Coverage

No tests exist for this assertion

Section 7.2 - Container invocations and interception

a0)

When the application invokes a method of a bean via a contextual reference to the bean, as defined in Section 6.5.3, "Contextual reference for a bean", or a business method of a session bean via an EJB remote or local reference, the invocation is treated as a business method invocation.

a1)

Invocations of initializer methods by the container are not business method invocations.

Coverage

org.jboss.jsr299.tck.tests.interceptors.invocation
InterceptorInvocationTest.testInitializerMethodsNotIntercepted()fisheye|svn

Invocations of producer, disposer and observer methods by the container are business method invocations are are intercepted by method interceptors and decorators.

ia)

Verify producer methods are intercepted

Coverage

org.jboss.jsr299.tck.tests.interceptors.invocation
InterceptorInvocationTest.testProducerMethodsAreIntercepted()fisheye|svn
ib)

Verify producer methods are decorated

Coverage

org.jboss.jsr299.tck.tests.decorators.invocation.producer.method
DecoratorInvocationTest.testDecoratorInvocation()fisheye|svn
ic)

Verify disposer methods are intercepted

Coverage

org.jboss.jsr299.tck.tests.interceptors.invocation
InterceptorInvocationTest.testDisposerMethodsAreIntercepted()fisheye|svn
id)

Verify disposer methods are decorated

Coverage

org.jboss.jsr299.tck.tests.decorators.invocation.producer.method
DecoratorInvocationTest.testDecoratorInvocation()fisheye|svn
ie)

Verify observer methods are intercepted

Coverage

org.jboss.jsr299.tck.tests.interceptors.invocation
InterceptorInvocationTest.testObserverMethodsAreIntercepted()fisheye|svn
if)

Verify observer methods are decorated

Coverage

org.jboss.jsr299.tck.tests.decorators.invocation.observer
DecoratorInvocationTest.testDecoratorInvocation()fisheye|svn
ig)

Invocation of EJB timer service timeouts by the container are not business method invocations, but are intercepted by interceptors for EJB timeouts.

Coverage

No tests exist for this assertion

j)

Invocation of lifecycle callbacks by the container are not business method invocations, but are intercepted by interceptors for lifecycle callbacks.

Coverage

org.jboss.jsr299.tck.tests.interceptors.invocation
InterceptorInvocationTest.testLifecycleCallbacksAreIntercepted()fisheye|svn

Invocations of interceptors and decorator methods during method or lifecycle callback interception are not business method invocations, and therefore no recursive interception occurs.

ka)

Verify decorators callbacks are not intercepted

Coverage

No tests exist for this assertion

kb)

Verify decorators callbacks are not decorated

Coverage

org.jboss.jsr299.tck.tests.decorators.invocation
DecoratorInvocationTest.testChainedDecoratorInvocation()fisheye|svn
kc)

Verify interceptor callbacks are not intercepted

Coverage

No tests exist for this assertion

kd)

Verify interceptor callbacks are not decorated

Coverage

No tests exist for this assertion

Invocations of message listener methods of message-driven beans during message delivery are business method invocations.

la)

Verify message listener methods are intercepted

Coverage

No tests exist for this assertion

lb)

Verify message listener methods are decorated

Coverage

No tests exist for this assertion

m)

Invocations of methods declared by java.lang.Object are not business method invocations.

Coverage

No tests exist for this assertion

If, and only if, the invocation is a business method invocation it passes through method interceptors and decorators, and in the case of a session bean, it is subject to EJB services such a declarative transaction management, concurrency, security and asynchronicity, as defined by the EJB specification.

a)

Verify that a managed bean's business methods are intercepted

Coverage

org.jboss.jsr299.tck.tests.interceptors.invocation
InterceptorInvocationTest.testManagedBeanIsIntercepted()fisheye|svn
b)

Verify that a managed bean's business methods are decorated

Coverage

org.jboss.jsr299.tck.tests.decorators.invocation
DecoratorInvocationTest.testDecoratorInvocation()fisheye|svn
c)

Verify that a session bean's business methods are intercepted

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.enterprise.simpleInterception
SessionBeanInterceptorDefinitionTest.testSessionBeanIsIntercepted()fisheye|svn
d)

Verify that a session bean's business methods are decorated

Coverage

org.jboss.jsr299.tck.tests.decorators.invocation
EJBDecoratorInvocationTest.testEJBDecoratorInvocation()fisheye|svn
f)

Verify that a session bean's business methods receive EJB services

g)

If the invocation is not a business method invocation, it is treated as a normal Java method call and is not intercepted by the container.

Coverage

No tests exist for this assertion

The following assertion is not made explicitly by the spec, however it is implied h)

Verify that a non-contextual session bean reference is intercepted

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.enterprise.nonContextualReference
SessionBeanInterceptorOnNonContextualEjbReferenceTest.testNonContextualSessionBeanReferenceIsIntercepted()fisheye|svn

Section 7.3.1 - Lifecycle of managed beans

aa)

When the create() method of the Bean object that represents a managed bean is called, the container obtains an instance of the bean, as defined by the Managed Beans specification, calling the bean constructor as defined by Section 5.5.1, "Injection using the bean constructor", and performing dependency injection as defined in Section 5.5.2, "Injection of fields and initializer methods".

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testBeanCreateInjectsDependenciesAndInvokesInitializerToInstantiateInstance()fisheye|svn
SimpleBeanLifecycleTest.testCreateInjectsFieldsDeclaredInJava()fisheye|svn
SimpleBeanLifecycleTest.testPostConstructPreDestroy()fisheye|svn
ba)

When the destroy() method is called, the container destroys the instance, as defined by the Managed Beans specification, and any dependent objects, as defined in Section 5.5.3, "Destruction of dependent objects".

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testPostConstructPreDestroy()fisheye|svn
SimpleBeanLifecycleTest.testContextualDestroyDisposesWhenNecessary()fisheye|svn

Section 7.3.2 - Lifecycle of stateful session beans

aa)

When the create() method of a Bean object that represents a stateful session bean that is called, the container creates and returns a container-specific internal local reference to a new session bean instance. The reference must be passivation capable. This reference is not directly exposed to the application.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle
EnterpriseBeanLifecycleTest.testCreateSFSB()fisheye|svn
bb)

Before injecting or returning a contextual instance to the application, the container transforms its internal reference into an object that implements the bean types expected by the application and delegates method invocations to the underlying stateful session bean instance. This object must be passivation capable.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle
EnterpriseBeanLifecycleTest.testCreateSFSB()fisheye|svn
bc)

When the destroy() method is called, and if the underlying EJB was not already removed by direct invocation of a remove method by the application, the container removes the stateful session bean. The @PreDestroy callback must be invoked by the container.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle
EnterpriseBeanLifecycleTest.testDestroyRemovesSFSB()fisheye|svn
EnterpriseBeanLifecycleTest.testRemovedEjbIgnored()fisheye|svn

Section 7.3.3 - Lifecycle of stateless session and singleton beans

a)

When the create() method of a Bean object that represents a stateless session or singleton session bean is called, the container creates and returns a container-specific internal local reference to the session bean. This reference is not directly exposed to the application.

Coverage

No tests exist for this assertion

b)

Before injecting or returning a contextual instance to the application, the container transforms its internal reference into an object that implements the bean types expected by the application and delegates method invocations to the underlying session bean. This object must be passivation capable.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle
EnterpriseBeanLifecycleTest.testCreateSLSB()fisheye|svn
c)

When the destroy() method is called, the container simply discards this internal reference.

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle
EnterpriseBeanLifecycleTest.testDestroyRemovesSFSB()fisheye|svn

Section 7.3.4 - Lifecycle of producer methods

ea)

When the create() method of a Bean object that represents a producer method is called, the container must invoke the producer method as defined by Section 5.5.4, "Invocation of producer or disposer methods". The return value of the producer method, after method interception completes, is the new contextual instance to be returned by Bean.create().

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle
ProducerMethodLifecycleTest.testProducerMethodBeanCreate()fisheye|svn
ProducerMethodLifecycleTest.testProducerMethodInvokedOnCreate()fisheye|svn
k)

If the producer method returns a null value and the producer method bean has the scope @Dependent, the create() method returns a null value.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle
ProducerMethodLifecycleTest.testCreateReturnsNullIfProducerDoesAndDependent()fisheye|svn
l)

If the producer method returns a null value, and the scope of the producer method is not @Dependent, the create() method throws an IllegalProductException.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle
ProducerMethodLifecycleTest.testCreateFailsIfProducerReturnsNullAndNotDependent()fisheye|svn
ma)

When the destroy() method is called, and if there is a disposer method for this producer method, the container must invoke the disposer method as defined by Section 5.5.4, "Invocation of producer or disposer methods", passing the instance given to destroy() to the disposed parameter.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle
ProducerMethodLifecycleTest.testProducerMethodBeanDestroy()fisheye|svn
r)

Finally, the container destroys dependent objects, as defined in Section 5.5.3, "Destruction of dependent objects".

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle
ProducerMethodLifecycleTest.testProducerMethodBeanDestroy()fisheye|svn

Section 7.3.5 - Lifecycle of producer fields

ga)

When the create() method of a Bean object that represents a producer field is called, the container must access the producer field as defined by Section 5.5.5, "Access to producer field values" to obtain the current value of the field. The value of the producer field is the new contextual instance to be returned by Bean.create().

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle
ProducerFieldLifecycleTest.testProducerFieldBeanCreate()fisheye|svn
m)

If the producer field contains a null value and the producer field bean has the scope @Dependent, the create() method returns a null value.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle
ProducerFieldLifecycleTest.testProducerFieldReturnsNullIsDependent()fisheye|svn
n)

If the producer field contains a null value, and the scope of the producer method is not @Dependent, the create() method throws an IllegalProductException.

Coverage

org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle
ProducerFieldLifecycleTest.testProducerFieldForNullValueNotDependent()fisheye|svn
ProducerFieldLifecycleTest.testProducerFieldReturnsNullIsNotDependent()fisheye|svn
o)

When the destroy() method is called, and if there is a disposer method for this producer field, the container must invoke the disposer method as defined by Section 5.5.4, "Invocation of producer or disposer methods", passing the instance given to destroy() to the disposed parameter.

Coverage

No tests exist for this assertion

Section 7.3.6 - Lifecycle of resources

When the create() method of a Bean object that represents a resource is called, the container creates and returns a container-specific internal reference to the Java EE component environment resource, entity manager, entity manager factory, remote EJB instance or web service reference. This reference is not directly exposed to the application.

la)

Check Java EE component environment resource

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.resource
InjectionOfResourceTest.testProduceResourceProxy()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.simple.resource.env
EnvInjectionTest.testProduceEnvProxy()fisheye|svn
lb)

Check Entity Manager

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext
PersistenceContextInjectionTest.testInjectionOfPersistenceContext()fisheye|svn
lc)

Check Entity Manager Factory

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext
PersistenceContextInjectionTest.testInjectionOfPersistenceUnit()fisheye|svn
PersistenceContextInjectionTest.testPassivationOfPersistenceUnit()fisheye|svn
ld)

Check Remote EJB instance

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb
EjbInjectionTest.testInjectionOfEjbs()fisheye|svn
le)

Check Web Service Reference

Coverage

No tests exist for this assertion

Before injecting or returning a contextual instance to the application, the container transforms its internal reference into an object that implements the bean types expected by the application and delegates method invocations to the underlying resource, entity manager, entity manager factory, remote EJB instance or web service reference. This object must be passivation capable.

ma)

Check delegations to underlying Java EE component environment resource

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.resource
InjectionOfResourceTest.testProduceResourceProxy()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.simple.resource.env
EnvInjectionTest.testProduceEnvProxy()fisheye|svn
mb)

Check injected Java EE component environment resource is passivation capable

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.resource
InjectionOfResourceTest.testPassivatingResource()fisheye|svn
mc)

Check delegations to underlying Entity Manager

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext
PersistenceContextInjectionTest.testInjectionOfPersistenceContext()fisheye|svn
md)

Check injected Entity Manager is passivation capable

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext
PersistenceContextInjectionTest.testPassivationOfPersistenceContext()fisheye|svn
me)

Check delegations to Entity Manager Factory

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext
PersistenceContextInjectionTest.testInjectionOfPersistenceUnit()fisheye|svn
mf)

Check injected Entity Manager Factory is passivation capable

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext
PersistenceContextInjectionTest.testPassivationOfPersistenceUnit()fisheye|svn
mg)

Check delegations to underlying Remote EJB instance

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb
EjbInjectionTest.testInjectionOfEjbs()fisheye|svn
mh)

Check injected Remote EJB instance is passivation capable

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb
EjbInjectionTest.testPassivationOfEjbs()fisheye|svn
mj)

Check delegations to underlying Web Service Reference

Coverage

No tests exist for this assertion

mk)

Check injected Web Service Reference is passivation capable

Coverage

No tests exist for this assertion

The container must perform ordinary Java EE component environment injection upon any non-static field that functions as a resource declaration, as defined by the Java EE platform and Common Annotations for the Java platform specifications.

o)

Check @Resource injection

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.resource.resource
InjectionOfResourceTest.testProduceResourceProxy()fisheye|svn
org.jboss.jsr299.tck.tests.implementation.simple.resource.env
EnvInjectionTest.testProduceEnvProxy()fisheye|svn
p)

The container is not required to perform Java EE component environment injection upon a static field. Portable applications should not rely upon the value of a static field that functions as a resource declaration.

q)

References to EJBs and web services are always dependent scoped and a new instance must be obtained for every injection performed.

Coverage

No tests exist for this assertion

r)

For an entity manager associated with a resource definition, it must behave as though it were injected directly using @PersistencContext.

Coverage

No tests exist for this assertion

s)

When the destroy() method of a bean which represents a remote stateful EJB reference is called, the container will not automatically destroy the EJB reference.

Coverage

No tests exist for this assertion

Section 8 - Decorators

a)

Decorators may be associated with any managed bean that is not itself an interceptor or decorator or with any EJB session bean.

b)

A decorator instance is a dependent object of the object it decorates.

Coverage

No tests exist for this assertion

Section 8.1 - Decorator beans

a)

A decorator is a managed bean.

b)

The set of decorated types of a decorator includes all bean types of the managed bean which are Java interfaces, except for java.io.Serializable.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testDecoratedTypes()fisheye|svn
c)

The decorator bean class and its superclasses are not decorated types of the decorator.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testDecoratedTypes()fisheye|svn
d)

The decorator class may be abstract.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testDecoratorIsManagedBean()fisheye|svn
e)

Decorators of a session bean must comply with the bean provider programming restrictions defined by the EJB specification.

Coverage

No tests exist for this assertion

f)

Decorators of a stateful session bean must comply with the rules for instance passivation and conversational state defined by the EJB specification.

Coverage

No tests exist for this assertion

Section 8.1.1 - Declaring a decorator

a)

A decorator is declared by annotating the bean class with the @javax.decorator.Decorator stereotype.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testDecoratorIsManagedBean()fisheye|svn

Section 8.1.2 - Decorator delegate injection points

a)

All decorators have a delegate injection point. A delegate injection point is an injection point of the bean class. The type and qualifiers of the injection point are called the delegate type and delegate qualifiers. The decorator applies to beans that are assignable to the delegate injection point. The delegate injection point must be be declared by annotating the injection point with the annotation @javax.decorator.Delegate.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testDelegateInjectionPoint()fisheye|svn

A decorator must have exactly one delegate injection point. If a decorator has more than one delegate injection point, or does not have a delegate injection point, the container automatically detects the problem and treats it as a definition error.

ca)

Test with more than one delegate injection point.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition.broken.multipleDelegateInjectionPoints
MultipleDelegateInjectionPointsTest.testMultipleDelegateInjectionPoints()fisheye|svn
cb)

Test a decorator without a delegate injection point.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition.broken.noDelegateInjectionPoints
NoDelegateInjectionPointsTest.testNoDelegateInjectionPoints()fisheye|svn

The delegate injection point must be an injected field, initializer method parameter or bean constructor method parameter. If an injection point that is not an injected field, initializer method parameter or bean constructor method parameter is annotated @Delegate, the container automatically detects the problem and treats it as a definition error.

cc)

Check an injected field is ok

Coverage

org.jboss.jsr299.tck.tests.decorators.definition.inject.delegateField
DelegateFieldInjectionPointTest.testDecoratorDelegateInjectionPoints()fisheye|svn
cd)

Check an initializer method parameter is ok

Coverage

org.jboss.jsr299.tck.tests.decorators.definition.inject.delegateInitializerMethod
DelegateInjectionPointTest.testDecoratorDelegateInjectionPoints()fisheye|svn
ce)

Check a bean constructor method parameter is ok

Coverage

org.jboss.jsr299.tck.tests.decorators.definition.inject.delegateConstructor
DelegateInjectionPointTest.testDecoratorDelegateInjectionPoints()fisheye|svn
cf)

Check that a producer method parameter is not ok

Coverage

org.jboss.jsr299.tck.tests.decorators.definition.inject.broken.delegateProducerMethod
DelegateInjectionPointTest.testDecoratorDelegateInjectionPoints()fisheye|svn
cg)

If a bean class that is not a decorator has an injection point annotated @Delegate, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition.broken.nonDecoratorWithDecorates
NonDecoratorWithDecoratesTest.testNonDecoratorWithDecoratesAnnotationNotOK()fisheye|svn
f)

The container must inject a delegate object to the delegate injection point. The delegate object implements the delegate type and delegates method invocations to the remaining uninvoked decorators and eventually to the bean. When the container calls a decorator during business method interception, the decorator may invoke any method of the delegate object.

Coverage

org.jboss.jsr299.tck.tests.decorators.invocation
DecoratorInvocationTest.testDecoratorInvocation()fisheye|svn
DecoratorInvocationTest.testChainedDecoratorInvocation()fisheye|svn
g)

If a decorator invokes the delegate object at any other time, the invoked method throws an IllegalStateException.

Coverage

org.jboss.jsr299.tck.tests.decorators.invocation
DecoratorInvocationTest.testDecoratorInvokesDelegateMethodOutsideOfBusinessMethodInterception()fisheye|svn

Section 8.1.3 - Decorated types of a decorator

a)

The delegate type of a decorator must implement or extend every decorated type. If the delegate type does not implement or extend a decorated type of the decorator, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition.broken.notAllDecoratedTypesImplemented
NotAllDecoratedTypesImplementedTest.testNotAllDecoratedTypesImplemented()fisheye|svn
ab)

If a decorated type is a parameterized type and the delegate type does not have exactly the same type parameters as the decorated type, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition.broken.parameterizedTypesWithDifferentTypeParameters
DifferentTypeParametersTest.testTypeParametersOnDecoratedTypeAndDelegateTypeDoNotMatch()fisheye|svn
b)

A decorator is not required to implement the delegate type.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testDecoratorDoesNotImplementDelegateType()fisheye|svn
c)

A decorator may be an abstract Java class, and is not required to implement every method of every decorated type.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testDecoratorIsManagedBean()fisheye|svn
ca)

Whenever the decorator does not implement a method of the decorated type, the container will provide an implicit implementation that calls the method on the delegate.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testAbstractDecoratorNotImplementingMethodOfDecoratedType()fisheye|svn
cb)

If a decorator has abstract methods that are not declared by a decorated type, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition.broken.invalidAbstractMethodOnDecorator
DecoratorWithInvalidAbstractMethodTest.testAbstractMethodsNotDeclaredByDecoratedTypeNotOk()fisheye|svn
d)

The decorator intercepts every method which is declared by a decorated type of the decorator and is implemented by the bean class of the decorator.

Coverage

org.jboss.jsr299.tck.tests.decorators.invocation
DecoratorInvocationTest.testDecoratorInvocation()fisheye|svn
DecoratorInvocationTest.testChainedDecoratorInvocation()fisheye|svn

Section 8.2 - Decorator enablement and ordering

a)

By default, decorators are not enabled. A decorator must be explicitly enabled by listing its bean class under the <decorators> element in beans.xml file of the bean archive.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testNonEnabledDecoratorNotResolved()fisheye|svn
b)

The order of the decorator declarations determines the decorator ordering. Decorators which occur earlier in the list are called first.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testDecoratorOrdering()fisheye|svn

Each child <class> element must specify the name of a decorator bean class. If there is no class with the specified name, or if the class with the specified name is not a decorator bean class, the container automatically detects the problem and treats it as a deployment problem.

ba)

Test with a nonexistent class name.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition.broken.nonExistantClassInBeansXml
NonExistantDecoratorClassInBeansXmlTest.testNonExistantDecoratorClassInBeansXmlNotOK()fisheye|svn
bb)

Test with a non-decorator class.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition.broken.enabledDecoratorIsNotDecorator
EnabledDecoratorNotADecoratorTest.testEnabledDecoratorNotADecoratorTest()fisheye|svn
bc)

If the same class is listed twice under the <decorators> element, the container automatically detects the problem and treats it as a deployment problem.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition.broken.decoratorListedTwiceInBeansXml
DecoratorListedTwiceInBeansXmlTest.testDecoratorListedTwiceInBeansXmlNotOK()fisheye|svn
f)

Decorators are called after interceptors.

Coverage

org.jboss.jsr299.tck.tests.decorators.interceptor
DecoratorAndInterceptorTest.testInterceptorCalledBeforeDecorator()fisheye|svn

Section 8.3 - Decorator resolution

aa)

The process of matching decorators to a certain bean is called decorator resolution. A decorator is bound to a bean if the bean is assignable to the delegate injection point according to the rules defined in Section 5.2, "Typesafe resolution", and the decorator is enabled in the bean archive containing the bean.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testDecoratorIsManagedBean()fisheye|svn
DecoratorDefinitionTest.testDecoratorOrdering()fisheye|svn
ab)

If a decorator matches a managed bean, and the managed bean class is declared final, the container automatically detects the problem and treats it as a deployment problem.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition.broken.finalBeanClass
FinalBeanClassTest.testAppliesToFinalManagedBeanClass()fisheye|svn
org.jboss.jsr299.tck.tests.decorators.custom.broken.finalBeanClass
CustomDecoratorMatchingBeanWithFinalClassTest.testCustomDecoratorDecoratingFinalBean()fisheye|svn
ac)

If a decorator matches a managed bean with a non-static, non-private, final method, and the decorator also implements that method, the container automatically detects the problem and treats it as a deployment problem.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition.broken.finalBeanMethod
FinalBeanMethodTest.testAppliesToFinalMethodOnManagedBeanClass()fisheye|svn
b)

For a custom implementation of the Decorator interface defined in Section 11.1.1, "The Decorator interface", the container calls getDelegateType(), getDelegateQualifiers() and getDecoratedTypes() to determine the delegate type and qualifiers and decorated types of the decorator.

Coverage

org.jboss.jsr299.tck.tests.decorators.custom
CustomDecoratorTest.testCustomImplementationOfDecoratorInterface()fisheye|svn

Section 8.3.1 - Assignability of raw and parameterized types for delegate injection points

A raw bean type is considered assignable to a parameterized delegate type if the raw types are identical and all type parameters of the delegate type are either unbounded type variables or java.lang.Object.

aa)

Check all type parameters are unbounded type variables

Coverage

org.jboss.jsr299.tck.tests.decorators.resolution
DecoratorResolutionTest.testUnboundedTypeVariables()fisheye|svn
ab)

Check all type parameters are Object

Coverage

org.jboss.jsr299.tck.tests.decorators.resolution
DecoratorResolutionTest.testObject()fisheye|svn
ac)

Check mix

Coverage

org.jboss.jsr299.tck.tests.decorators.resolution
DecoratorResolutionTest.testUnboundedTypeVariablesAndObject()fisheye|svn

A parameterized bean type is considered assignable to a parameterized delegate type if they have identical raw type and for each parameter: the delegate type parameter and the bean type parameter are actual types with identical raw type, and, if the type is parameterized, the bean type parameter is assignable to the delegate type parameter according to these rules, or the delegate type parameter is a wildcard, the bean type parameter is an actual type and the actual type is assignable to the upper bound, if any, of the wildcard and assignable from the lower bound, if any, of the wildcard, or the delegate type parameter is a wildcard, the bean type parameter is a type variable and the upper bound of the type variable is assignable to the upper bound, if any, of the wildcard and assignable from the lower bound, if any, of the wildcard, or the delegate type parameter and the bean type parameter are both type variables and the upper bound of the bean type parameter is assignable to the upper bound, if any, of the delegate type parameter, or the delegate type parameter is a type variable, the bean type parameter is an actual type, and the actual type is assignable to the upper bound, if any, of the type variable.

c)

Check both have identical type parameters

Coverage

org.jboss.jsr299.tck.tests.decorators.resolution
DecoratorResolutionTest.testIdenticalTypeParamerters()fisheye|svn
d)

Check nested identical type parameters

Coverage

org.jboss.jsr299.tck.tests.decorators.resolution
DecoratorResolutionTest.testNestedIdenticalTypeParamerters()fisheye|svn
e)

Check delegate type parameter is a wildcard, the bean type parameter is an actual type and the actual type is assignable to the upper bound of the wildcard and assignable from the lower bound of the wildcard

Coverage

org.jboss.jsr299.tck.tests.decorators.resolution
DecoratorResolutionTest.testDelegateWildcardBeanActualType()fisheye|svn
f)

Check delegate type parameter is a wildcard, the bean type parameter is a type variable and the upper bound of the type variable is assignable to the upper bound of the wildcard and assignable from the lower bound of the wildcard

Coverage

org.jboss.jsr299.tck.tests.decorators.resolution
DecoratorResolutionTest.testDelegateWildcardBeanTypeVariable()fisheye|svn
g)

Check the delegate type parameter and the bean type parameter are both type variables and the upper bound of the bean type parameter is assignable to the upper bound of the delegate type parameter

Coverage

org.jboss.jsr299.tck.tests.decorators.resolution
DecoratorResolutionTest.testDelegateTypeVariableBeanTypeVariable()fisheye|svn
h)

Check the delegate type parameter is a type variable, the bean type parameter is an actual type, and the actual type is as- signable to the upper bound of the type variable

Coverage

org.jboss.jsr299.tck.tests.decorators.resolution
DecoratorResolutionTest.testDelegateTypeVariableBeanActualType()fisheye|svn

Section 8.4 - Decorator invocation

a)

Whenever a business method is invoked on an instance of a bean with decorators, the container intercepts the business method invocation and, after processing all interceptors of the method, invokes decorators of the bean. The container searches for the first decorator of the instance that implements the method that is being invoked as a business method.

Coverage

org.jboss.jsr299.tck.tests.decorators.invocation
DecoratorInvocationTest.testDecoratorInvocation()fisheye|svn
b)

If no such decorator exists, the container invokes the business method of the intercepted instance.

Coverage

org.jboss.jsr299.tck.tests.decorators.invocation
DecoratorInvocationTest.testDecoratorInvocation()fisheye|svn
c)

Otherwise, the container calls the method of the decorator.

Coverage

org.jboss.jsr299.tck.tests.decorators.invocation
DecoratorInvocationTest.testDecoratorInvocation()fisheye|svn
d)

When any decorator is invoked by the container, it may in turn invoke a method of the delegate. The container intercepts the delegate invocation and searches for the first decorator of the instance such that the decorator occurs after the decorator invoking the delegate, and the decorator implements the method that is being invoked upon the delegate.

Coverage

org.jboss.jsr299.tck.tests.decorators.invocation
DecoratorInvocationTest.testChainedDecoratorInvocation()fisheye|svn
e)

If no such decorator exists, the container invokes the business method of the intercepted instance.

Coverage

org.jboss.jsr299.tck.tests.decorators.invocation
DecoratorInvocationTest.testChainedDecoratorInvocation()fisheye|svn
f)

Otherwise, the container calls the method of the decorator.

Coverage

org.jboss.jsr299.tck.tests.decorators.invocation
DecoratorInvocationTest.testChainedDecoratorInvocation()fisheye|svn

Section 9.1 - Interceptor binding types

a)

An interceptor binding type is a Java annotation defined as @Target({TYPE, METHOD}) or @Target(TYPE) and @Retention(RUNTIME).

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testInterceptorBindingAnnotation()fisheye|svn
b)

An interceptor binding type may be declared by specifying the @javax.interceptor.InterceptorBinding meta-annotation.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testInterceptorBindingAnnotation()fisheye|svn
c)

Multiple interceptors may be bound to the same interceptor binding type or types.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testInterceptorBindingAnnotation()fisheye|svn

Section 9.1.1 - Interceptor binding types with additional interceptor bindings

a)

An interceptor binding type may declare other interceptor bindings.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testInterceptorBindingsCanDeclareOtherInterceptorBindings()fisheye|svn
b)

Interceptor bindings are transitive - an interceptor binding declared by an interceptor binding type is inherited by all beans and other interceptor binding types that declare that interceptor binding type.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testInterceptorBindingsCanDeclareOtherInterceptorBindings()fisheye|svn
c)

Interceptor binding types declared @Target(TYPE) may not be applied to interceptor binding types declared @Target({TYPE, METHOD}).

Section 9.1.2 - Interceptor bindings for stereotypes

a)

Interceptor bindings may be applied to a stereotype by annotating the stereotype annotation

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testStereotypeInterceptorBindings()fisheye|svn
b)

An interceptor binding declared by a stereotype are inherited by any bean that declares that stereotype.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testStereotypeInterceptorBindings()fisheye|svn
c)

If a stereotype declares interceptor bindings, it must be defined as @Target(TYPE).

Section 9.2 - Declaring the interceptor bindings of an interceptor

a)

The interceptor bindings of an interceptor are specified by annotating the interceptor class with the binding types and the @javax.interceptor.Interceptor annotation.

Coverage

org.jboss.jsr299.tck.tests.interceptors.invocation
InterceptorInvocationTest.testManagedBeanIsIntercepted()fisheye|svn
ab)

An interceptor class may declare multiple interceptor bindings.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.multipleBindings
MultipleInterceptorBindingsTest.testInterceptorAppliedToBeanWithAllBindings()fisheye|svn
b)

If an interceptor does not declare an @Interceptor annotation, it must be bound to beans using @Interceptors or ejb-jar.xml.

Coverage

No tests exist for this assertion

c)

All interceptors declared using @Interceptor must specify at least one interceptor binding. If an interceptor declared using @Interceptor does not declare any interceptor binding, non-portable behavior results.

d)

An interceptor for lifecycle callbacks may only declare interceptor binding types that are defined as @Target(TYPE). If an interceptor for lifecycle callbacks declares an interceptor binding type that is defined @Target({TYPE, METHOD}), the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.broken.interceptorForLifecycleTargetMethod
InterceptorForLifecycleTargetMethodTest.testInterceptorForLifecycleTargetMethod()fisheye|svn

Section 9.3 - Binding an interceptor to a bean

a)

An interceptor binding may be declared by annotating the bean class, or a method of the bean class, with the interceptor binding type.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager.bean
SyntheticBeanTest.testSyntheticBeanIntercepted()fisheye|svn
org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testInterceptorBindingAnnotation()fisheye|svn

A bean class or method of a bean class may declare multiple interceptor bindings.

ba)

A bean class may declare multiple interceptor bindings.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.multipleBindings
MultipleInterceptorBindingsTest.testInterceptorAppliedToBeanWithAllBindings()fisheye|svn
bb)

A method of a bean class may declare multiple interceptor bindings.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.multipleBindings
MultipleInterceptorBindingsTest.testMultipleInterceptorsOnMethod()fisheye|svn

If the bean class of a managed bean declares or inherits a class level interceptor binding or a stereotype with interceptor bindings, it must not be declared final, or have any non-static, non-private, final methods. If a managed bean has a class-level interceptor binding and is declared final or has a non-static, non-private, final method, the container automatically detects the problem and treats it as a definition error.

ca)

If the bean class of a managed bean declares a class level interceptor binding, it must not be declared final.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor
FinalClassClassLevelInterceptorTest.testFinalClassWithClassLevelInterceptor()fisheye|svn
cb)

If the bean class of a managed bean declares a class level interceptor binding, it must not have any non-static, non-private, final methods.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor
FinalMethodClassLevelInterceptorTest.testFinalMethodWithClassLevelInterceptor()fisheye|svn
cc)

If the bean class of a managed bean inherits a class level interceptor binding, it must not be declared final.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.inheritance.broken.binding
FinalClassWithInheritedClassLevelInterceptorTest.testFinalClassWithInheritedClassLevelInterceptor()fisheye|svn
cd)

If the bean class of a managed bean inherits a class level interceptor binding, it must not have any non-static, non-private, final methods.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.inheritance.broken.binding
FinalMethodWithInheritedClassLevelInterceptorTest.testFinalMethodWithInheritedClassLevelInterceptor()fisheye|svn
ce)

If the bean class of a managed bean inherits a stereotype with interceptor bindings, it must not be declared final.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.inheritance.broken.binding
FinalMethodWithInheritedStereotypeInterceptorTest.testFinalClassWithInheritedStereotypeInterceptor()fisheye|svn
cf)

If the bean class of a managed bean inherits a stereotype with interceptor bindings, it must not have any non-static, non-private, final methods.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.inheritance.broken.binding
FinalClassWithInheritedStereotypeInterceptorTest.testFinalMethodWithInheritedStereotypeInterceptor()fisheye|svn

If a non-static, non-private method of a bean class of a managed bean declares a method level interceptor binding, neither the method nor the bean class may be declared final. If a non-static, non-private, final method of a managed bean has a method level interceptor binding, the container automatically detects the problem and treats it as a definition error.

da)

If a non-static, non-private method of a bean class of a managed bean declares a method level interceptor binding, the bean class may not be declared final.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor
FinalClassMethodLevelInterceptorTest.testFinalClassWithMethodLevelInterceptor()fisheye|svn
db)

If a non-static, non-private method of a bean class of a managed bean declares a method level interceptor binding, the method may not be declared final.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor
FinalMethodMethodLevelInterceptorTest.testFinalMethodWithMethodLevelInterceptor()fisheye|svn

Section 9.4 - Interceptor enablement and ordering

a)

By default, a bean deployment archive has no enabled interceptors bound via interceptor bindings. An interceptor must be explicitly enabled by listing its class under the <interceptors> element of the beans.xml file of the bean archive.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.interceptorNotListedInBeansXml
InterceptorNotListedInBeansXmlNotEnabledTest.testInterceptorNotListedInBeansXmlNotInvoked()fisheye|svn
b)

The order of the interceptor declarations determines the interceptor ordering. Interceptors which occur earlier in the list are called first.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.interceptorOrder
InterceptorOrderTest.testInterceptorsCalledInOrderDefinedByBeansXml()fisheye|svn

Each child <class> element must specify the name of an interceptor class. If there is no class with the specified name, or if the class with the specified name is not an interceptor class, the container automatically detects the problem and treats it as a deployment problem.

caa)

Test with a non-existant class.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.broken.nonExistantClassInBeansXml
NonExistantClassInBeansXmlTest.testNonExistantClassInBeansXmlNotOk()fisheye|svn
cab)

Test with a class that isn't an interceptor.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.broken.nonInterceptorClassInBeansXml
NonInterceptorClassInBeansXmlTest.testNonInterceptorClassInBeansXmlNotOk()fisheye|svn
cb)

If the same class is listed twice under the <interceptors> element, the container automatically detects the problem and treats it as a deployment problem.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.broken.sameClassListedTwiceInBeansXml
SameClassListedTwiceInBeansXmlTest.testSameInterceptorClassListedTwiceInBeansXmlNotOk()fisheye|svn

Interceptors declared using @Interceptors or in ejb-jar.xml are called before interceptors declared using interceptor bindings.

fa)

Test with a managed bean

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.interceptorOrder
InterceptorOrderTest.testInterceptorsDeclaredUsingInterceptorsCalledBeforeInterceptorBinding()fisheye|svn
fb)

Test with session bean

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.enterprise.interceptorOrder
SessionBeanInterceptorOrderTest.testInterceptorsDeclaredUsingInterceptorsCalledBeforeInterceptorBinding()fisheye|svn
g)

Interceptors are called before decorators.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.interceptorCalledBeforeDecorator
InterceptorCalledBeforeDecoratorTest.testInterceptorCalledBeforeDecorator()fisheye|svn

Section 9.5 - Interceptor resolution

a)

For a lifecycle callback method, the interceptor bindings include the interceptor bindings declared or inherited by the bean at the class level, including, recursively, interceptor bindings declared as meta-annotations of other interceptor bindings and stereotypes.

Coverage

No tests exist for this assertion

For a business method, or EJB timeout method, the bean interceptor bindings include the interceptor bindings declared or inherited by the bean at the class level, including, recursively, interceptor bindings declared as meta-annotations of other interceptor bindings and stereotypes, together with all interceptor bindings declared at the method level, including, recursively, interceptor bindings declared as meta-annotations of other interceptor bindings.

ba)

Check a business method

Coverage

No tests exist for this assertion

ba)

Check an EJB timeout method

Coverage

No tests exist for this assertion

ca)

An interceptor is bound to a method if the method has all the interceptor bindings of the interceptor. A method has an interceptor binding of an interceptor if it has an interceptor binding with (a) the same type and (b) the same annotation member value for each member which is not annotated @javax.enterprise.util.NonBinding, and the interceptor intercepts the given kind of lifecycle callback or business method, and the interceptor is enabled in the bean archive containing the bean.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.multipleBindings
MultipleInterceptorBindingsTest.testInterceptorAppliedToBeanWithAllBindings()fisheye|svn

For a custom implementation of the Interceptor interface defined in Section 11.1.2, "The Interceptor interface", the container calls getInterceptorBindings() to determine the interceptor bindings of the interceptor and intercepts() to determine if the interceptor intercepts a given kind of lifecycle callback, EJB timeout or business method.

fa)

Check for @PostConstruct

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.custom
CustomInterceptorTest.testCustomPostConstructInterceptor()fisheye|svn
fb)

Check for @PreDestroy

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.custom
CustomInterceptorTest.testCustomPreDestroyInterceptor()fisheye|svn
fc)

Check for @PostActivate

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.custom
CustomInterceptorTest.testCustomPostActivateInterceptor()fisheye|svn
fd)

Check for @PrePassivate

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.custom
CustomInterceptorTest.testCustomPrePassivateInterceptor()fisheye|svn
fe)

Check for @AroundInvoke

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.custom
CustomInterceptorTest.testCustomAroundInvokeInterceptor()fisheye|svn
ff)

Check for @AroundTimeout

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.custom
CustomInterceptorTest.testCustomAroundTimeoutInterceptor()fisheye|svn

Section 9.5.1 - Interceptors with multiple bindings

An interceptor class may specify multiple interceptor bindings.

a)

Test that the interceptor is applied to a bean with all of the bindings.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.multipleBindings
MultipleInterceptorBindingsTest.testInterceptorAppliedToBeanWithAllBindings()fisheye|svn
b)

Test that the interceptor it not applied to a bean with only some of the interceptor bindings.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.multipleBindings
MultipleInterceptorBindingsTest.testInterceptorNotAppliedToBeanWithSomeBindings()fisheye|svn

Section 9.5.2 - Interceptor binding types with members

a)

Interceptor binding types may have annotation members.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.member
InterceptorBindingTypeWithMemberTest.testInterceptorBindingTypeWithMember()fisheye|svn
ab)

Annotation member values are compared using equals().

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.member
InterceptorBindingTypeWithMemberTest.testInterceptorBindingTypeMemberValuesComparedWithEquals()fisheye|svn
b)

An annotation member may be excluded from consideration using the @Nonbinding annotation.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.member
InterceptorBindingTypeWithMemberTest.testInterceptorBindingTypeWithNonBindingMember()fisheye|svn
ca)

Array-valued or annotation-valued members of an interceptor binding type should be annotated @Nonbinding in a portable application. If an array-valued or annotation-valued member of an interceptor binding type is not annotated @Nonbinding, non-portable behavior results.

cb)

Interceptor bindings defined on methods may override the interceptor bindings defined on classes.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.binding.overriding
InterceptorBindingOverridingTest.testInterceptorBindingOverriden()fisheye|svn
d)

If the set of interceptor bindings of a bean or interceptor, including bindings inherited from stereotypes and other interceptor bindings, has two instances of a certain interceptor binding type and the instances have different values of some annotation member, the bean or interceptor must override the inherited set by definining an annotation instance of its own, otherwise, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.broken.invalidBindingAnnotations
InvalidStereotypeInterceptorBindingAnnotationsTest.testInterceptorBindingsWithConflictingAnnotationMembersNotOk()fisheye|svn
InvalidTransitiveInterceptorBindingAnnotationsTest.testInterceptorBindingsWithConflictingAnnotationMembersNotOk()fisheye|svn

Section 10.1 - Event types and qualifier types

aa)

An event object is an instance of a concrete Java class with no type variables.

Coverage

org.jboss.jsr299.tck.tests.event.eventTypes
EventTypesTest.testEventTypeIsConcreteTypeWithNoTypeVariables()fisheye|svn
c)

The event types of the event include all superclasses and interfaces of the runtime class of the event object.

Coverage

org.jboss.jsr299.tck.tests.event.eventTypes
EventTypesTest.testEventTypeIncludesAllSuperclassesAndInterfacesOfEventObject()fisheye|svn
cb)

An event type may not contain a type variable.

d)

An event qualifier type is a Java annotation defined as @Target({FIELD, PARAMETER}) or @Target({METHOD, FIELD, PARAMETER, TYPE}) and @Retention(RUNTIME)

Coverage

org.jboss.jsr299.tck.tests.event.bindingTypes
EventBindingTypesTest.testEventBindingTypeTargetsMethodFieldParameterElementTypes()fisheye|svn
e)

An event qualifier type is a Java annotation defined as @Target({FIELD, PARAMETER}) or @Target({METHOD, FIELD, PARAMETER, TYPE}) and @Retention(RUNTIME)

Coverage

org.jboss.jsr299.tck.tests.event.bindingTypes
EventBindingTypesTest.testEventBindingTypeTargetsFieldParameterElementTypes()fisheye|svn
f)

An event qualifier type is a Java annotation defined as @Target({FIELD, PARAMETER}) or @Target({METHOD, FIELD, PARAMETER, TYPE}) and @Retention(RUNTIME)

Coverage

org.jboss.jsr299.tck.tests.event.bindingTypes
EventBindingTypesTest.testNonRuntimeBindingTypeIsNotAnEventBindingType()fisheye|svn
EventBindingTypesTest.testFireEventWithNonRuntimeBindingTypeFails()fisheye|svn
g)

All event qualifier types must specify the @javax.inject.Qualifier meta-annotation

Coverage

org.jboss.jsr299.tck.tests.event.bindingTypes
EventBindingTypesTest.testFireEventWithNonBindingAnnotationsFails()fisheye|svn
i)

Every event has the qualifier @javax.enterprise.inject.Any, even if it does not explicitly declare this qualifier.

Coverage

org.jboss.jsr299.tck.tests.event.bindingTypes
EventBindingTypesTest.testEventAlwaysHasAnyBinding()fisheye|svn
org.jboss.jsr299.tck.tests.event.implicit
ImplicitEventTest.testImplicitEventHasAnyBinding()fisheye|svn
j)

Any Java type may be an observed event type.

Coverage

org.jboss.jsr299.tck.tests.event.eventTypes
EventTypesTest.testEventTypeIsConcreteTypeWithNoTypeVariables()fisheye|svn

Section 10.2 - Observer resolution

a)

The process of matching an event to its observer methods is called observer resolution. The container considers event type and qualifiers when resolving observers.

b)

Observer resolution usually occurs at runtime.

i)

An event is delivered to an observer method if the observer method belongs to an enabled bean, the event object is assignable to the observed event type, taking type parameters into consideration, the observer method has no event qualifiers or has a subset of the event qualifiers. An observer method has an event qualifier if it has an observed event qualifier with (a) the same type and (b) the same annotation member value for each member which is not annotated @javax.enterprise.util.Nonbinding. Also the event is not a container lifecycle event, as defined in Section 11.5 "Container lifecycle events", or the observer method belongs to an extension.

Coverage

org.jboss.jsr299.tck.tests.event.observer
ObserverTest.testObserverNotifiedWhenEventTypeAndAllBindingsMatch()fisheye|svn
j)

If the runtime type of the event object contains a type variable, the container must throw an IllegalArgumentException.

Coverage

No tests exist for this assertion

k)

For a custom implementation of the ObserverMethod interface defined in Section 11.1.3, "The ObserverMethod interface", the container must call getObservedType() and getObservedQualifiers() to determine the observed event type and qualifiers.

Coverage

No tests exist for this assertion

Section 10.2.1 - Assignability of type variables, raw and parameterized types

a)

An event type is considered assignable to a type variable if the event type is assignable to the upper bound, if any.

Coverage

org.jboss.jsr299.tck.tests.event.resolve.typeWithParameters
CheckTypeParametersWhenResolvingObserversTest.testResolvingChecksTypeParametersOnObservesMethod()fisheye|svn
b)

A parameterized event type is considered assignable to a raw observed event type if the raw types are identical.

Coverage

org.jboss.jsr299.tck.tests.event.resolve.typeWithParameters
CheckTypeParametersWhenResolvingObserversTest.testResolvingChecksTypeParameters()fisheye|svn
c)

A parameterized event type is considered assignable to a parameterized observed event type if they have identical raw type and for each parameter the observed event type parameter is an actual type with identical raw type to the event type parameter, and, if the type is parameterized, the event type parameter is assignable to the observed event type parameter according to these rules, or the observed event type parameter is a wildcard and the event type parameter is assignable to the upper bound, if any, of the wildcard and assignable from the lower bound, if any, of the wildcard, or the observed event type parameter is a type variable and the event type parameter is assignable to the upper bound, if any, of the type variable.

Coverage

No tests exist for this assertion

Section 10.2.2 - Event qualifier types with members

a)

The qualifier type for an Event qualifier may have annotation members.

Coverage

org.jboss.jsr299.tck.tests.event.observer.resolve
ResolveEventObserversTest.testObserverMethodMayHaveMultipleBindingTypes()fisheye|svn
org.jboss.jsr299.tck.tests.event.resolve.binding
ResolvingChecksBindingTypeMembersTest.testResolvingChecksBindingTypeMembers()fisheye|svn
b)

The container uses equals() to compare event qualifier type member values.

Section 10.2.3 - Multiple event qualifiers

a)

An event parameter may have multiple qualifiers.

Coverage

org.jboss.jsr299.tck.tests.event.observer.resolve
ResolveEventObserversTest.testObserverMethodMayHaveMultipleBindingTypes()fisheye|svn
b)

An observer method will only be notified if all the observed event qualifiers are specified when the event is fired.

Coverage

org.jboss.jsr299.tck.tests.event
EventTest.testObserverMethodNotifiedWhenBindingsMatch()fisheye|svn
c)

Other, less specific, observers will also be notified of events with multiple event qualifiers.

Coverage

org.jboss.jsr299.tck.tests.event
EventTest.testObserverMethodNotifiedWhenBindingsMatch()fisheye|svn

Section 10.3 - Firing events

a)

Beans fire events via an instance of the javax.enterprise.event.Event interface, which may be injected.

Coverage

org.jboss.jsr299.tck.tests.event.fires
FireEventTest.testInjectedAnyEventCanFireEvent()fisheye|svn
b)

The method fire() accepts an event object.

Coverage

org.jboss.jsr299.tck.tests.event.fires
FireEventTest.testInjectedEventAcceptsEventObject()fisheye|svn
c)

Any combination of qualifiers may be specified at the injection point.

Coverage

org.jboss.jsr299.tck.tests.event.fires
FireEventTest.testInjectedEventCanHaveBindings()fisheye|svn
d)

Or, the @Any qualifier may be used, allowing the application to specify qualifiers dynamically.

Coverage

org.jboss.jsr299.tck.tests.event.fires
FireEventTest.testInjectedEventCanSpecifyBindingsDynamically()fisheye|svn

Section 10.3.1 - The Event interface

ca)

The Event interface provides a method for firing events with a specified combination of type and qualifiers.

Coverage

org.jboss.jsr299.tck.tests.event.fires
FireEventTest.testEventProvidesMethodForFiringEventsWithCombinationOfTypeAndBindings()fisheye|svn
cb)

For an injected Event, the specified type is the type parameter specified at the injection point, and the specified qualifiers are the qualifiers specified at the injection point.

Coverage

org.jboss.jsr299.tck.tests.event.fires
FireEventTest.testInjectedEventAcceptsEventObject()fisheye|svn
FireEventTest.testInjectedEventCanHaveBindings()fisheye|svn
eaa)

The select() method returns a child Event for a given specified type and additional specified qualifiers. If no specified type is given, the specified type is the same as the parent.

Coverage

org.jboss.jsr299.tck.tests.event.select
SelectEventTest.testEventSelectReturnsEventOfSameType()fisheye|svn
eab)

If the specified type contains a type variable, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.event.select
SelectEventTest.testEventSelectThrowsExceptionIfEventTypeHasTypeVariable()fisheye|svn
eba)

If two instances of the same qualifier type are passed to select(), an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.event.select
SelectEventTest.testEventSelectThrowsExceptionForDuplicateBindingType()fisheye|svn
SelectEventTest.testEventSelectWithSubtypeThrowsExceptionForDuplicateBindingType()fisheye|svn
ec)

If an instance of an annotation that is not a qualifier type is passed to select(), an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.event.select
SelectEventTest.testEventSelectThrowsExceptionIfAnnotationIsNotBindingType()fisheye|svn
SelectEventTest.testEventSelectWithSubtypeThrowsExceptionIfAnnotationIsNotBindingType()fisheye|svn
eda)

The method fire() fires an event with the specified qualifiers and notifies observers, as defined by Section 10.5, "Observer notification".

Coverage

org.jboss.jsr299.tck.tests.event.fires
FireEventTest.testEventSelectedFiresAndObserversNotified()fisheye|svn
f)

If the runtime type of the event object contains a type variable, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.event.fires
FireEventTest.testEventFireThrowsExceptionIfEventObjectContainsTypeVariable()fisheye|svn

Section 10.3.2 - The built-in Event

a)

The container must provide a built-in bean with Event<X> in its set of bean types, for every Java type x that does not contain a type variable.

Coverage

org.jboss.jsr299.tck.tests.event.implicit
ImplicitEventTest.testImplicitEventExistsForEachEventType()fisheye|svn
b)

The container must provide a built-in bean with every event qualifier type in its set of qualifier types.

Coverage

org.jboss.jsr299.tck.tests.event.implicit
ImplicitEventTest.testImplicitEventHasAllExplicitBindingTypes()fisheye|svn
d)

The container must provide a built-in bean with scope @Dependent.

Coverage

org.jboss.jsr299.tck.tests.event.implicit
ImplicitEventTest.testImplicitEventHasDependentScope()fisheye|svn
e)

The container must provide a built-in bean with no bean EL name.

Coverage

org.jboss.jsr299.tck.tests.event.implicit
ImplicitEventTest.testImplicitEventHasNoName()fisheye|svn
f)

The container must provide a built-in bean with an implementation provided automatically by the container.

Coverage

org.jboss.jsr299.tck.tests.event.implicit
ImplicitEventTest.testImplicitEventHasImplementation()fisheye|svn
g)

The built-in implementation must be a passivation capable dependency, as defined in Section 6.6.2, "Passivation capable dependencies".

Coverage

org.jboss.jsr299.tck.tests.event.implicit
ImplicitEventTest.testImplicitEventIsPassivationCapable()fisheye|svn

Section 10.4 - Observer methods

a0)

An observer method allows the application to receive and respond to event notifications.

aa)

An observer method is a non-abstract method of a managed bean class or session bean class (or of an extension, as defined in Section 11.5, "Container lifecycle events").

Coverage

org.jboss.jsr299.tck.tests.event.broken.observer.beanNotManaged
ObserverMethodOnIncorrectBeanTest.testObserverMethodNotOnManagedOrSessionBeanFails()fisheye|svn
org.jboss.jsr299.tck.tests.event.resolve.typeWithParameters
CheckTypeParametersWhenResolvingObserversTest.testResolvingChecksTypeParametersOnObservesMethod()fisheye|svn
c)

An observer method may be either static or non-static.

Coverage

org.jboss.jsr299.tck.tests.event
EventTest.testStaticObserverMethodInvoked()fisheye|svn
d)

If the bean is a session bean, the observer method must be either a business method of the EJB or a static method of the bean class.

Coverage

org.jboss.jsr299.tck.tests.event.observer.resolve.enterprise
ResolveEnterpriseEventObserverTest.testObserverMethodOnEnterpriseBeanIsBusinessMethodOrStatic()fisheye|svn
org.jboss.jsr299.tck.tests.event.broken.observer.notBusinessMethod
EJBObserverMethodNotBusinessMethodTest.testObserverMethodOnEnterpriseBeanNotBusinessMethodOrStaticFails()fisheye|svn
e)

There may be arbitrarily many observer methods with the same event parameter type and qualifiers.

Coverage

org.jboss.jsr299.tck.tests.event.observer.resolve
ResolveEventObserversTest.testMultipleObserverMethodsForSameEventPermissible()fisheye|svn
f)

A bean (or extension) may declare multiple observer methods.

Coverage

org.jboss.jsr299.tck.tests.event.observer.resolve
ResolveEventObserversTest.testMultipleObserverMethodsOnBeanPermissible()fisheye|svn

Section 10.4.1 - Event parameter of an observer method

a)

Each observer method must have exactly one event parameter, of the same type as the event type it observes. When searching for observer methods for an event, the container considers the type and qualifiers of the event parameter

Coverage

org.jboss.jsr299.tck.tests.event.resolve.typeWithParameters
ChecksEventTypeWhenResolvingTest.testResolvingChecksEventType()fisheye|svn
org.jboss.jsr299.tck.tests.event.broken.observer.tooManyParameters
ObserverMethodWithTwoEventParametersTest.testObserverMethodMustHaveOnlyOneEventParameter()fisheye|svn
org.jboss.jsr299.tck.tests.event.resolve.binding
ResolvingChecksBindingTypeMembersTest.testResolvingChecksBindingTypeMembers()fisheye|svn
b)

If the event parameter does not explicitly declare any qualifier, the observer method observes events with no qualifier.

Coverage

org.jboss.jsr299.tck.tests.event.observer.resolve
ResolveEventObserversTest.testObserverMethodWithoutBindingTypesObservesEventsWithoutBindingTypes()fisheye|svn

The event parameter type may contain a type variable or wildcard.

ca)

Test with a type variable.

Coverage

org.jboss.jsr299.tck.tests.event.observer.wildcardAndTypeVariable
ObserverMethodWithParametertizedTypeTest.testObserverMethodCanObserveWildcardType()fisheye|svn
cb)

Test with a wildcard.

Coverage

org.jboss.jsr299.tck.tests.event.observer.wildcardAndTypeVariable
ObserverMethodWithParametertizedTypeTest.testObserverMethodCanObserveTypeVariable()fisheye|svn

Section 10.4.2 - Declaring an observer method

a)

An observer method may be declared by annotating a parameter @javax.enterprise.event.Observes. That parameter is the event parameter. The declared type of the parameter is the observed event type.

Coverage

org.jboss.jsr299.tck.tests.event.observer.resolve
ResolveEventObserversTest.testMethodWithParameterAnnotatedWithObservesRegistersObserverMethod()fisheye|svn
b)

If a method has more than one parameter annotated @Observes, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.event.broken.observer.tooManyParameters
ObserverMethodWithTwoEventParametersTest.testObserverMethodMustHaveOnlyOneEventParameter()fisheye|svn
c)

Observed event qualifiers may be declared by annotating the event parameter.

Coverage

org.jboss.jsr299.tck.tests.event.observer.resolve
ResolveEventObserversTest.testObserverMethodMayHaveMultipleBindingTypes()fisheye|svn
d)

If an observer method is annotated @Produces the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.event.broken.observer.isProducer
ObserverMethodAnnotatedProducesTest.testObserverMethodAnnotatedProducesFails()fisheye|svn
e)

If an observer method is annotated @Inject the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.event.broken.observer.isInitializer
ObserverMethodAnnotatedInitialzerTest.testObserverMethodAnnotatedInitializerFails()fisheye|svn
org.jboss.jsr299.tck.tests.deployment.lifecycle.broken.failsDuringBeanDiscovery
DeploymentFailureTest.testDeploymentFailsBeforeNotifyingObserversAfterBeanDiscovery()fisheye|svn
f)

If an observer method has a parameter annotated @Disposes, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.event.broken.observer.isDisposer
ObserverMethodAnnotatedDisposesTest.testObserverMethodWithDisposesParamFails()fisheye|svn
g)

If a non-static method of a session bean class has a parameter annotated @Observes, and the method is not a business method of the EJB, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.event.broken.observer.notBusinessMethod
EJBObserverMethodNotBusinessMethodTest.testObserverMethodOnEnterpriseBeanNotBusinessMethodOrStaticFails()fisheye|svn
h)

Interceptors and decorators may not declare observer methods. If an interceptor or decorator has a method with a parameter annotated @Observes, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition.broken.observer
InterceptorWithObserverMethodTest.testInterceptorWithObserverMethodNotOk()fisheye|svn
org.jboss.jsr299.tck.tests.decorators.definition.broken.observer
DecoratorWithObserverMethodTest.testDecoratorWithObserverMethodNotOk()fisheye|svn
i)

In addition to the event parameter, observer methods may declare additional parameters, which may declare qualifiers. These additional parameters are injection points.

Coverage

org.jboss.jsr299.tck.tests.event.observer.broken.validation
ObserverMethodParameterInjectionValidationTest.test()fisheye|svn
org.jboss.jsr299.tck.tests.event
EventTest.testObserverMethodReceivesInjectionsOnNonObservesParameters()fisheye|svn

Section 10.4.3 - Conditional observer methods

a)

A conditional observer method may be declared by specifying receive=IF_EXISTS.

Coverage

org.jboss.jsr299.tck.tests.event.observer.conditional
ConditionalObserverTest.testConditionalObserver()fisheye|svn
b)

Beans with scope @Dependent may not have conditional observer methods. If a bean with scope @Dependent has an observer method declared receive=IF_EXISTS, the container automatically detects the problem and treats it as a definition error.

Coverage

org.jboss.jsr299.tck.tests.event.broken.observer.dependentIsConditionalObserver
DependentIsConditionalObserverTest.testDependentBeanWithConditionalObserverMethodIsDefinitionError()fisheye|svn
c)

The enumeration javax.enterprise.event.Reception identifies the possible values of receive.

Coverage

org.jboss.jsr299.tck.tests.event.observer.conditional
ConditionalObserverTest.testNotifyEnumerationContainsNotifyValues()fisheye|svn

Section 10.4.4 - Transactional observer methods

a)

Transactional observer methods are observer methods which receive event notifications during the before or after completion phase of the transaction in which the event was fired. If no transaction is in progress when the event is fired, they are notified at the same time as other observers

Coverage

org.jboss.jsr299.tck.tests.event.observer.transactional
TransactionalObserverTest.testSucessfullTransaction()fisheye|svn
TransactionalObserverTest.testFailedTransaction()fisheye|svn
TransactionalObserverTest.testNoTransaction()fisheye|svn
b)

A before completion observer method is called during the before completion phase of the transaction

Coverage

org.jboss.jsr299.tck.tests.event.observer.transactional
TransactionalObserverTest.testSucessfullTransaction()fisheye|svn
TransactionalObserverTest.testFailedTransaction()fisheye|svn
c)

An after completion observer method is called during the after completion phase of the transaction

Coverage

org.jboss.jsr299.tck.tests.event.observer.transactional
TransactionalObserverTest.testSucessfullTransaction()fisheye|svn
TransactionalObserverTest.testFailedTransaction()fisheye|svn
d)

An after success observer method is called during the after completion phase of the transaction, only when the transaction completes successfully

Coverage

org.jboss.jsr299.tck.tests.event.observer.transactional
TransactionalObserverTest.testSucessfullTransaction()fisheye|svn
TransactionalObserverTest.testFailedTransaction()fisheye|svn
e)

An after failure observer method is called during the after completion phase of the transaction, only when the transaction fails

Coverage

org.jboss.jsr299.tck.tests.event.observer.transactional
TransactionalObserverTest.testSucessfullTransaction()fisheye|svn
TransactionalObserverTest.testFailedTransaction()fisheye|svn
f)

The enumeration javax.enterprise.event.TransactionPhase identifies the kind of transactional observer method.

gaa)

A transactional observer method may be declared by specifying any value other than IN_PROGRESS for during.

Coverage

org.jboss.jsr299.tck.tests.event.observer.transactional
TransactionalObserverTest.testSucessfullTransaction()fisheye|svn
TransactionalObserverTest.testFailedTransaction()fisheye|svn

Section 10.5 - Observer notification

aa)

When an event is fired by the application, the container must determine the observers for that event according to the observer resolution defined by Section 10.2, "Observer resolution", then then for each observer method, either invoke the observer method immediately or register the observer method for later invocation during the transaction completion phase, using a JTA Synchronization.

Coverage

org.jboss.jsr299.tck.tests.event.observer.resolve
ResolveEventObserversTest.testObserverMethodRegistration()fisheye|svn
org.jboss.jsr299.tck.tests.event.observer
ObserverTest.testObserverNotifiedWhenEventTypeAndAllBindingsMatch()fisheye|svn
ba)

The container calls observer methods as defined in Section 5.5.6, "Invocation of observer methods".

Coverage

No tests exist for this assertion

bb)

If the observer method is a transactional observer method and there is currently a JTA transaction in progress, the container calls the observer method during the appropriate transaction completion phase. Otherwise, the container calls the observer immediately.

Coverage

org.jboss.jsr299.tck.tests.event.observer.transactional
TransactionalObserverTest.testSucessfullTransaction()fisheye|svn
TransactionalObserverTest.testFailedTransaction()fisheye|svn
bc)

If the observer method is a transactional observer method and there is currently a JTA transaction in progress, the container calls the observer method during the appropriate transaction completion phase. Otherwise, the container calls the observer immediately.

Coverage

org.jboss.jsr299.tck.tests.event.observer.transactional
TransactionalObserverTest.testNoTransaction()fisheye|svn
bca)

If the observer method is a conditional observer method and there is no context active for the scope to which the bean declaring the observer method belongs, then the observer method should not be called.

Coverage

org.jboss.jsr299.tck.tests.event.observer.conditional
ConditionalObserverTest.testConditionalObserverMethodNotInvokedIfNoActiveContext()fisheye|svn
bcb)

The order in which observer methods are called is not defined, and so portable applications should not rely upon the order in which observers are called.

bd)

Any observer method called before completion of a transaction may call setRollbackOnly() to force a transaction rollback.

Coverage

No tests exist for this assertion

bd)

An observer method may not directly initiate, commit or rollback JTA transactions.

ca)

Observers may throw exceptions. If an observer method is a transactional observer method, any exception is caught and logged by the container.

cb)

Observers may throw exceptions. If an observer method is a transactional observer method, any exception is caught and logged by the container. Otherwise, the exception aborts processing of the event.

Coverage

org.jboss.jsr299.tck.tests.event.observer.abortProcessing
ObserverExceptionAbortsProcessingTest.testObserverThrowsExceptionAbortsNotifications()fisheye|svn
cc)

Observers may throw exceptions. If an observer method is a transactional observer method, any exception is caught and logged by the container. Otherwise, the exception aborts processing of the event. No other observer methods of that event will be called. The BeanManager.fireEvent() or Event.fire() method rethrows the exception. If the exception is a checked exception, it is wrapped and rethrown as an (unchecked) ObserverException.

Coverage

org.jboss.jsr299.tck.tests.event.observer.runtimeException
ObserverExceptionRethrownTest.testNonTransactionalObserverThrowsNonCheckedExceptionIsRethrown()fisheye|svn
cd)

Observers may throw exceptions. If an observer method is a transactional observer method, any exception is caught and logged by the container. Otherwise, the exception aborts processing of the event. No other observer methods of that event will be called. The BeanManager.fireEvent() or Event.fire() method rethrows the exception. If the exception is a checked exception, it is wrapped and rethrown as an (unchecked) ObserverException.

Coverage

org.jboss.jsr299.tck.tests.event.observer.checkedException
CheckedExceptionWrappedTest.testNonTransactionalObserverThrowsCheckedExceptionIsWrappedAndRethrown()fisheye|svn
f)

For a custom implementation of the ObserverMethod interface defined in Section 11.1.3, "The ObserverMethod interface", the container must call getReception() and getTransactionPhase() to determine if the observer method is a conditional or transactional observer method, and notify() to invoke the method.

Coverage

No tests exist for this assertion

fa)

CDI 1.1 implementations should call the notify method which takes both the event object and the event qualifiers only.

Coverage

org.jboss.jsr299.tck.tests.event.observer.extension
BeanManagerObserverNotificationTest.testNoQualifier()fisheye|svn
BeanManagerObserverNotificationTest.testSingleQualifier()fisheye|svn
BeanManagerObserverNotificationTest.testMultipleQualifiers()fisheye|svn
EventBeanObserverNotificationTest.testNoQualifier()fisheye|svn
EventBeanObserverNotificationTest.testSingleQualifier()fisheye|svn
EventBeanObserverNotificationTest.testMultipleQualifiers()fisheye|svn

Section 10.5.1 - Observer method invocation context

ba)

If the observer method is a before completion transactional observer method, it is called within the context of the transaction that is about to complete and with the same client security context and lifecycle contexts.

Coverage

No tests exist for this assertion

c)

If the observer method is any other kind of transactional observer method, it is called in an unspecified transaction context, but with the same client security context and lifecycle contexts as the transaction that just completed.

Coverage

No tests exist for this assertion

da)

If an observer method is not a before completion transactional method, and not any other kind of transactional observer method, then the observer method is called in the same transaction context, client security context and lifecycle contexts as the invocation of Event.fire() or BeanManager.fireEvent().

Coverage

No tests exist for this assertion

e)

The transaction and security contexts for a business method of a session bean also depend upon the transaction attribute and @RunAs descriptor, if any.

Coverage

No tests exist for this assertion

Section 11 - Portable extensions

a)

A portable extension may integrate with the container by providing its own beans, interceptors and decorators to the container.

b)

A portable extension may integrate with the container by injecting dependencies into its own objects using the dependency injection service.

c)

A portable extension may integrate with the container by providing a context implementation for a custom scope.

f)

Augmenting or overriding the annotation-based metadata with metadata from some other source.

Section 11.1 - The Bean interface

aa)

Implementations of Bean must also implement the inherited operations defined by the Contextual interface defined in Section 6.1, "The Contextual interface".

Coverage

org.jboss.jsr299.tck.tests.context.dependent
DependentContextTest.testContextIsActiveWhenInvokingDisposalMethod()fisheye|svn
org.jboss.jsr299.tck.tests.context
DestroyedInstanceReturnedByGetTest.testDestroyedInstanceMustNotBeReturnedByGet()fisheye|svn
ba)

getTypes(), getQualifiers(), getScope(), getName() and getStereotypes() must return the bean types, qualifiers, scope type, EL name and stereotypes of the bean, as defined in Chapter 2, Concepts.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.broken.invalid
InvalidQualifierTest.test()fisheye|svn
InvalidStereotypeTest.test()fisheye|svn
InvalidTypesTest.test()fisheye|svn
InvalidScopeTest.test()fisheye|svn
org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testQualifiersNonEmpty()fisheye|svn
BeanDefinitionTest.testHasScopeType()fisheye|svn
BeanDefinitionTest.testBeanTypes()fisheye|svn
BeanDefinitionTest.testMultipleStereotypes()fisheye|svn
bb)

getBeanClass() returns the bean class of the managed bean or session bean or of the bean that declares the producer method or field.

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testBeanClassOnSimpleBean()fisheye|svn
bc)

isAlternative() must return true if the bean is an alternative, and false otherwise.

Coverage

org.jboss.jsr299.tck.tests.alternative
AlternativeAvailabilityTest.testIsAlternative()fisheye|svn
bd)

isNullable() must return true if the method create() sometimes returns a null value, and false otherwise, as defined in Section 5.2.4, "Primitive types and null values".

Coverage

org.jboss.jsr299.tck.tests.definition.bean
BeanDefinitionTest.testIsNullable()fisheye|svn
c)

getInjectionPoints() returns a set of InjectionPoint objects, defined in Section 5.5.7, "Injection point metadata", representing injection points of the bean, that will be validated by the container at initialization time.

Coverage

org.jboss.jsr299.tck.tests.definition.qualifier
QualifierDefinitionTest.testDefaultQualifierForInjectionPoint()fisheye|svn
f)

An instance of Bean exists for every enabled bean.

Coverage

org.jboss.jsr299.tck.tests.deployment.lifecycle
DeploymentTest.testOnlyEnabledBeansDeployed()fisheye|svn
g)

A portable extension may add support for new kinds of beans beyond those defined by the this specification (managed beans, session beans, producer methods, producer fields and resources) by implementing Bean and registering beans with the container, using the mechanism defined in Section 11.5.2, "AfterBeanDiscovery event".

Section 11.1.1 - The Decorator interface

a)

The Bean object for a decorator must implement the interface javax.enterprise.inject.spi.Decorator.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testDecoratorIsManagedBean()fisheye|svn
b)

getDecoratedTypes() returns the decorated types of the decorator.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testDecoratedTypes()fisheye|svn
c)

getDelegateType() and getDelegateQualifiers() return the delegate type and qualifiers of the decorator.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testDelegateInjectionPoint()fisheye|svn
d)

An instance of Decorator exists for every enabled decorator.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testInstanceOfDecoratorForEachEnabled()fisheye|svn

Section 11.1.2 - The Interceptor interface

a)

The Bean object for an interceptor must implement javax.enterprise.inject.spi.Interceptor.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testInterceptorsImplementInterceptorInterface()fisheye|svn
b)

getInterceptorBindings() returns the interceptor bindings of the interceptor.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testInterceptorBindingTypes()fisheye|svn
c)

intercepts() returns true if the interceptor intercepts the specified kind of lifecycle callback or method invocation, and false otherwise.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testInterceptionType()fisheye|svn
d)

intercept() invokes the specified kind of lifecycle callback or method invocation interception upon the given instance of the interceptor.

Coverage

org.jboss.jsr299.tck.tests.extensions.interceptors.custom
CustomInterceptorInvocationTest.testCustomInterceptorInvocation()fisheye|svn
e)

An InterceptionType identifies the kind of lifecycle callback, EJB timeout method or business method.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testInterceptionType()fisheye|svn
f)

An instance of Interceptor exists for every enabled interceptor.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testInstanceOfInterceptorForEveryEnabledInterceptor()fisheye|svn

Section 11.1.3 - The ObserverMethod interface

a)

The interface javax.enterprise.inject.spi.ObserverMethod defines everything the container needs to know about an observer method.

b)

getBeanClass() returns the bean class of the bean that declares the observer method.

Coverage

org.jboss.jsr299.tck.tests.event.observer
ObserverTest.testGetBeanOnObserverMethod()fisheye|svn
c)

getObservedType() and getObservedQualifiers() return the observed event type and qualifiers.

Coverage

org.jboss.jsr299.tck.tests.event.observer
ObserverTest.testGetObservedTypeOnObserverMethod()fisheye|svn
ObserverTest.testGetObservedBindingsOnObserverMethod()fisheye|svn
d)

getReception() returns IF_EXISTS for a conditional observer and ALWAYS otherwise.

Coverage

org.jboss.jsr299.tck.tests.event.observer
ObserverTest.testGetNotifyOnObserverMethod()fisheye|svn
e)

getTransactionPhase() returns the appropriate transaction phase for a transactional observer method or IN_PROGRESS otherwise.

Coverage

org.jboss.jsr299.tck.tests.event
EventTest.testGetTransactionPhaseOnObserverMethod()fisheye|svn
f)

notify() calls the observer method, as defined in Section 5.5.6 "Invocation of observer methods".

Coverage

org.jboss.jsr299.tck.tests.event
EventTest.testNonStaticObserverMethodIndirectlyInherited()fisheye|svn
ga)

An instance of ObserverMethod exists for every observer method of every enabled bean.

Coverage

org.jboss.jsr299.tck.tests.event
EventTest.testInstanceOfBeanForEveryEnabledObserverMethod()fisheye|svn

Section 11.2 - The Producer and InjectionTarget interfaces

a)

The interface javax.enterprise.inject.spi.Producer provides a generic operation for producing an instance of a type.

For a Producer that represents a class, produce() calls the constructor annotated @Inject if it exists, or the constructor with no parameters otherwise, as defined in Section 5.5.1, "Injection using the bean constructor". and returns the resulting instance. If the class has interceptors, produce() is responsible for building the interceptors and decorators of the instance.

ba)

Test field injection occurs

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceAndInjectCallsInitializerAndConstructor()fisheye|svn
bb)

Test initializer methods called

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceAndInjectCallsInitializerAndConstructor()fisheye|svn
bc)

Test constructor injected

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceAndInjectCallsInitializerAndConstructor()fisheye|svn
bd)

Test decorator stack built

Coverage

No tests exist for this assertion

be)

Test interceptor stack built

Coverage

No tests exist for this assertion

c)

For a Producer that represents a class, dispose() does nothing.

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testDisposeDoesNothing()fisheye|svn

For a Producer that represents a class, getInjectionPoints() returns a set of InjectionPoint objects representing all injected fields, bean constructor parameters and initializer method parameters.

da)

Test injected fields.

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testGetInjectionPointsForFields()fisheye|svn
db)

Test bean constructor parameters.

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testGetInjectionPointsForConstructorAndInitializer()fisheye|svn
dc)

Test initializer method parameters.

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testGetInjectionPointsForConstructorAndInitializer()fisheye|svn

For a Producer that represents a producer method or field, produce() calls the producer method on, or accesses the producer field of, a contextual instance of the bean that declares the producer method, as defined in Section 5.5.4, "Invocation of producer or disposer methods".

eaa)

Test with producer method.

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceCallsProducerMethod()fisheye|svn
eba)

Test with producer field.

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceAccessesProducerField()fisheye|svn

For a Producer that represents a producer method or field, dispose() calls the disposer method, if any, on a contextual instance of the bean that declares the disposer method, as defined in Section 5.5.4, "Invocation of producer or disposer methods", or performs any additional required cleanup, if any, to destroy state associated with a resource.

faa)

Test with producer method.

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProducerForMethodDisposesProduct()fisheye|svn
g)

For a Producer that represents a producer method, getInjectionPoints() returns the set of InjectionPoint objects representing all parameters of the producer method.

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testInjectionPointsForProducerMethod()fisheye|svn
h)

The subinterface javax.enterprise.inject.spi.InjectionTarget provides operations for performing dependency injection and lifecycle callbacks on an instance of a type.

i)

inject() performs dependency injection upon the given object. The container performs Java EE component environment injection, according to the semantics required by the Java EE platform specification, sets the value of all injected fields, and calls all initializer methods, as defined in Section 5.5.2, "Injection of fields and initializer methods".

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testInjectionTargetInject()fisheye|svn
j)

postConstruct() calls the @PostConstruct callback, if it exists, according to the semantics required by the Java EE platform specification.

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testInjectionTargetPostConstruct()fisheye|svn
k)

preDestroy() calls the @PreDestroy callback, if it exists, according to the semantics required by the Java EE platform specification.

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testInjectionTargetPreDestroy()fisheye|svn

Section 11.3 - The BeanManager object

The container provides a built-in bean with bean type BeanManager, scope @Dependent and qualifier @Default.

aa)

Test the bean type.

Coverage

org.jboss.jsr299.tck.tests.lookup.manager
ManagerTest.testContainerProvidesManagerBean()fisheye|svn
ab)

Test the scope.

Coverage

org.jboss.jsr299.tck.tests.lookup.manager
ManagerTest.testManagerBeanIsDependentScoped()fisheye|svn
ac)

Test the qualifier.

Coverage

org.jboss.jsr299.tck.tests.lookup.manager
ManagerTest.testManagerBeanHasCurrentBinding()fisheye|svn
b)

The built-in implementation must be a passivation capable dependency, as defined in Section 6.6.2, "Passivation capable dependencies".

Coverage

org.jboss.jsr299.tck.tests.lookup.manager
ManagerTest.testManagerBeanIsPassivationCapable()fisheye|svn
c)

Any bean may obtain an instance of BeanManager by injecting it.

Coverage

org.jboss.jsr299.tck.tests.lookup.manager
ManagerTest.testInjectingManager()fisheye|svn
e)

Any operation of BeanManager may be called at any time during the execution of the application.

Coverage

No tests exist for this assertion

Section 11.3.1 - Obtaining a reference to the CDI container

a)

A portable extension may obtain a reference to the current container by calling CDI.current().

Coverage

org.jboss.jsr299.tck.tests.lookup.manager.provider
CdiProviderIncontainerTest.testAccessingBeanManager()fisheye|svn
b)

When CDI.current() is called, the first javax.enterprise.inject.spi.CDIProvider is loaded, and the CDIProvider.getCDI() method called. If no providers are available an IllegalStateException is thrown.

d)

Java EE components may obtain an instance of BeanManager from JNDI by looking up the name java:comp/BeanManager.

Coverage

org.jboss.jsr299.tck.tests.lookup.manager.jndi
ManagerTest.testManagerLookupInJndi()fisheye|svn
ManagerTestEar.testManagerLookupInJndi()fisheye|svn
e)

Web components may obtain an instance of BeanManager by calling ServletContext.getAttribute("javax.enterprise.inject.spi.BeanManager").

Coverage

org.jboss.jsr299.tck.tests.implementation.builtin.servlet
ServletContainerBuiltinBeanTest.testBeanManagerAvailableViaServletContext()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.manager.web
BeanManagerServletContextEarTest.testCorrectBeanManagerAvailable()fisheye|svn

Section 11.3.2 - Obtaining a contextual reference for a bean

a)

The method BeanManager.getReference() returns a contextual reference for a given bean and bean type, as defined in Section 6.5.3, "Contextual reference for a bean".

Coverage

org.jboss.jsr299.tck.tests.lookup.manager
ManagerTest.testGetReferenceReturnsContextualInstance()fisheye|svn
b)

The first parameter is the Bean object representing the bean. The second parameter represents the bean type that must be implemented by any client proxy that is returned. The third parameter is an instance of CreationalContext that may be used to destroy any object with scope @Dependent that is created.

Coverage

org.jboss.jsr299.tck.tests.lookup.manager
ManagerTest.testGetReferenceReturnsContextualInstance()fisheye|svn
c)

If the given type is not a bean type of the given bean, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.lookup.manager
ManagerTest.testGetReferenceWithIllegalBeanType()fisheye|svn

Section 11.3.3 - Obtaining an injectable reference

a)

The method BeanManager.getInjectableReference() returns an injectable reference for a given injection point, as defined in Section 6.5.5, "Injectable references".

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectableReferenceTest.testGetInjectableReferenceOnBeanManager()fisheye|svn
ab)

The first parameter represents the target injection point. The second parameter is an instance of CreationalContext that may be used to destroy any object with scope @Dependent that is created.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectableReferenceTest.testGetInjectableReferenceOnBeanManager()fisheye|svn
b)

If the InjectionPoint represents a decorator delegate injection point, getInjectableReference() returns a delegate, as defined in Section 8.1.2, "Decorator delegate injection points".

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectableReferenceTest.testGetInjectableReferenceReturnsDelegateForDelegateInjectionPoint()fisheye|svn
bb)

If typesafe resolution results in an unsatisfied dependency, the container must throw an UnsatisfiedResolutionException.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.reference.unresolved
UnsatisfiedInjectableReferenceTest.testUnsatisfiedReference()fisheye|svn
bc)

If typesafe resolution results in an unresolvable ambiguous dependency, the container must throw an AmbiguousResolutionException.

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.reference.ambiguous
AmbiguousInjectableReferenceTest.testUnsatisfiedReference()fisheye|svn
c)

Implementations of Bean usually maintain a reference to an instance of BeanManager. When the Bean implementation performs dependency injection, it must obtain the contextual instances to inject by calling BeanManager.getInjectableReference(), passing an instance of InjectionPoint that represents the injection point and the instance of CreationalContext that was passed to Bean.create().

Coverage

No tests exist for this assertion

Section 11.3.4 - Obtaining a CreationalContext

a)

An instance of CreationalContext for a certain instance of Contextual may be obtained by calling BeanManager.createCreationalContext().

Coverage

org.jboss.jsr299.tck.tests.lookup.injectionpoint
InjectableReferenceTest.testGetInjectableReferenceOnBeanManager()fisheye|svn
b)

An instance of CreationalContext for a non-contextual object may be obtained by passing a null value to createCreationalContext().

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
CreationalContextForNonContextualTest.testCreationalContext()fisheye|svn

Section 11.3.5 - Obtaining a Bean by type

aa)

The method BeanManager.getBeans() returns the set of beans which have the given required type and qualifiers and are available for injection in the module or library containing the class into which the BeanManager was injected or the Java EE component from whose JNDI environment namespace the BeanManager was obtained, according to the rules of typesafe resolution defined in Section 5.2, "Typesafe resolution".

Coverage

org.jboss.jsr299.tck.tests.extensions.bean.bytype
BeanByTypeTest.testGetBeans()fisheye|svn
b)

The first parameter is a required bean type. The remaining parameters are required qualifiers.

Coverage

org.jboss.jsr299.tck.tests.extensions.bean.bytype
BeanByTypeTest.testGetBeans()fisheye|svn
c)

If no qualifiers are passed to getBeans(), the default qualifier @Default is assumed.

Coverage

org.jboss.jsr299.tck.tests.extensions.bean.bytype
BeanByTypeTest.testNoBindingImpliesCurrent()fisheye|svn
da)

If the given type represents a type variable, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.extensions.bean.bytype
BeanByTypeTest.testTypeVariable()fisheye|svn
e)

If two instances of the same qualifier type are given, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.extensions.bean.bytype
BeanByTypeTest.testSameBindingTwice()fisheye|svn
f)

If an instance of an annotation that is not a qualifier type is given, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.extensions.bean.bytype
BeanByTypeTest.testNonBindingType()fisheye|svn

Section 11.3.6 - Obtaining a Bean by name

aa)

The method BeanManager.getBeans() which accepts a string returns the set of beans which have the given EL name and are available for injection in the module or library containing the class into which the BeanManager was injected or the Java EE component from whose JNDI environment namespace the BeanManager was obtained, according to the rules of EL name resolution defined in Section 5.3, "EL name resolution".

Coverage

org.jboss.jsr299.tck.tests.lookup.byname
ResolutionByNameTest.testAmbiguousELNamesResolved()fisheye|svn
b)

The parameter is an EL name.

Coverage

org.jboss.jsr299.tck.tests.lookup.byname
ResolutionByNameTest.testAmbiguousELNamesResolved()fisheye|svn

Section 11.3.7 - Obtaining a passivation capable bean by identifier

a)

The method BeanManager.getPassivationCapableBean() returns the PassivationCapable bean with the given identifier (see Section 6.6.1, "Passivation capable beans").

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
PassivationIdTest.testGetPassivationCapableBeanById()fisheye|svn

Section 11.3.8 - Resolving an ambiguous dependency

a)

The method BeanManager.resolve() applies the ambiguous dependency resolution rules defined in Section 5.2.1, "Unsatisfied and ambiguous dependencies" to a set of Beans.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testAmbiguousDependencyResolved()fisheye|svn
b)

If the ambiguous dependency resolution rules fail, the container must throw an AmbiguousResolutionException.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testAmbiguousDependencyNotResolved()fisheye|svn

Section 11.3.9 - Validating an injection point

a)

The BeanManager.validate() operation validates an injection point and throws an InjectionException if there is a deployment problem (for example, an unsatisfied or unresolvable ambiguous dependency) associated with the injection point.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testValidateThrowsException()fisheye|svn
a)

The method validate() validates the dependency and throws an InjectionException if there is a deployment problem (for example, an unsatisfied or unresolvable ambiguous dependency) associated with the injection point.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testValidateThrowsException()fisheye|svn

Section 11.3.10 - Firing an event

a)

The method BeanManager.fireEvent() fires an event and notifies observers, according to Section 10.5, "Observer notification".

Coverage

org.jboss.jsr299.tck.tests.event.fires
FireEventTest.testBeanManagerFireEvent()fisheye|svn
FireEventTest.testBeanManagerInterfaceForFireEventMethod()fisheye|svn
b)

The first argument is the event object. The remaining parameters are event qualifiers.

Coverage

org.jboss.jsr299.tck.tests.event.fires
FireEventTest.testBeanManagerInterfaceForFireEventMethod()fisheye|svn
c)

If the runtime type of the event object contains a type variable, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.event.fires
FireEventTest.testTypeVariableEventTypeFails()fisheye|svn
d)

If two instances of the same qualifier type are given, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.event.fires
FireEventTest.testDuplicateBindingsToFireEventFails()fisheye|svn
e)

If an instance of an annotation that is not a qualifier type is given, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.event.fires.nonbinding
NonBindingTypePassedToFireTest.testExceptionThrownIfNonBindingTypePassedToFire()fisheye|svn

Section 11.3.11 - Observer method resolution

a)

The method BeanManager.resolveObserverMethods() resolves observer methods for an event according to the rules of observer resolution defined in Section 10.2, "Observer resolution".

Coverage

org.jboss.jsr299.tck.tests.event.observer.resolve
ResolveEventObserversTest.testBeanManagerResolveObserversSignature()fisheye|svn
org.jboss.jsr299.tck.tests.event.resolve.typeWithParameters
CheckTypeParametersWhenResolvingObserversTest.testResolvingChecksTypeParameters()fisheye|svn
b)

The first parameter of resolveObserverMethods() is the event object. The remaining parameters are event qualifiers.

Coverage

org.jboss.jsr299.tck.tests.event.observer.resolve
ResolveEventObserversTest.testBeanManagerResolveObserversSignature()fisheye|svn
c)

If the runtime type of the event object contains a type variable, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.event
EventTest.testEventObjectContainsTypeVariablesWhenResolvingFails()fisheye|svn
d)

If two instances of the same qualifier type are given, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.event.resolve.binding
DuplicateBindingTypesWhenResolvingTest.testDuplicateBindingTypesWhenResolvingFails()fisheye|svn
e)

If an instance of an annotation that is not a qualifier type is given, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.event.observer.resolve
ResolveEventObserversTest.testBeanManagerResolveObserversWithIllegalQualifier()fisheye|svn

Section 11.3.12 - Decorator resolution

a)

The method BeanManager.resolveDecorators() returns the ordered list of decorators for a set of bean types and a set of qualifiers which are enabled in the module or library containing the class into which the BeanManager was injected or the Java EE component from whose JNDI environment namespace the BeanManager was obtained, as defined in Section 8.3, "Decorator resolution".

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testDecoratedTypes()fisheye|svn
DecoratorDefinitionTest.testDecoratorOrdering()fisheye|svn
b)

The first argument is the set of bean types of the decorated bean. The annotations are qualifiers declared by the decorated bean.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testDecoratedTypes()fisheye|svn
c)

If two instances of the same qualifier type are given, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testDuplicateBindingsOnResolveDecoratorsFails()fisheye|svn
d)

If an instance of an annotation that is not a qualifier type is given, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testNonBindingsOnResolveDecoratorsFails()fisheye|svn
e)

If the set of bean types is empty, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.event.resolve.nonbinding
NonBindingTypesWhenResolvingTest.testNonBindingTypeAnnotationWhenResolvingFails()fisheye|svn
org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testEmptyTypeSetOnResolveDecoratorsFails()fisheye|svn

Section 11.3.13 - Interceptor resolution

a)

The method BeanManager.resolveInterceptors() returns the ordered list of interceptors for a set of interceptor bindings and a type of interception which are enabled in the module or library containing the class into which the BeanManager was injected or the Java EE component from whose JNDI environment namespace the BeanManager was obtained, as defined in Section 9.5, "Interceptor resolution".

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testResolveInterceptorsReturnsOrderedList()fisheye|svn
b)

If two instances of the same interceptor binding type are given, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testSameBindingTypesToResolveInterceptorsFails()fisheye|svn
c)

If no interceptor binding type instance is given, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testNoBindingTypesToResolveInterceptorsFails()fisheye|svn
d)

If an instance of an annotation that is not an interceptor binding type is given, an IllegalArgumentException is thrown.

Coverage

org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest.testNonBindingTypeToResolveInterceptorsFails()fisheye|svn

Section 11.3.14 - Determining if an annotation is a qualifier type, scope type, stereotype or interceptor binding type

A portable extension may test an annotation to determine if it is a qualifier type, scope type, stereotype or interceptor binding type, obtain the set of meta-annotations declared by a stereotype or interceptor binding type, or determine if a scope type is a normal or passivating scope.

aa)

Test qualifier type.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testDetermineBindingType()fisheye|svn
ab)

Test scope type.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testDetermineScopeType()fisheye|svn
ac)

Test stereotype.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testDetermineStereotype()fisheye|svn
ad)

Test interceptor binding type.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testDetermineInterceptorBindingType()fisheye|svn
ae)

Test meta-annotations for stereotype.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testGetMetaAnnotationsForStereotype()fisheye|svn
af)

Test meta-annotations for interceptor binding type.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testGetMetaAnnotationsForInterceptorBindingType()fisheye|svn
ag)

Test obtaining a ScopeType.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testgetScope()fisheye|svn

Section 11.3.15 - Obtaining the active Context for a scope

a)

The method BeanManager.getContext() retrieves an active context object associated with the a given scope, as defined in Section 6.5.1, "The active context object for a scope".

Coverage

org.jboss.jsr299.tck.tests.context
ContextTest.testBuiltInContexts()fisheye|svn

Section 11.3.16 - Obtaining the ELResolver

a)

The method BeanManager.getELResolver() returns the javax.el.ELResolver specified in Section 12.4, "Integration with Unified EL".

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testGetELResolver()fisheye|svn

Section 11.3.17 - Wrapping a Unified EL ExpressionFactory

a)

The method BeanManager.wrapExpressionFactory() returns a wrapper javax.el.ExpressionFactory that delegates MethodExpression and ValueExpression creation to the given ExpressionFactory.

Coverage

No tests exist for this assertion

b)

When a Unified EL expression is evaluated using a MethodExpression or ValueExpression returned by the wrapper ExpressionFactory, the rules defined in Section 6.4.3, "Dependent pseudo-scope and Unified EL" are enforced by the container.

Coverage

No tests exist for this assertion

Section 11.3.18 - Obtaining an AnnotatedType for a class

a)

The method BeanManager.createAnnotatedType() returns an AnnotatedType that may be used to read the annotations of a given Java class or interface.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testObtainingAnnotatedType()fisheye|svn
b)

If the AnnotatedType for the class has been wrapped or replaced by ProcessAnnotatedType then the wrapped or replaced AnnotatedType should be returned BeanManager.createAnnoatedType().

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testObtainingWrappedAnnotatedType()fisheye|svn

Section 11.3.19 - Obtaining an InjectionTarget for a class

The method BeanManager.createInjectionTarget() returns a container provided implementation of InjectionTarget for a given AnnotatedType or throws an IllegalArgumentException if there is a definition error associated with any injection point of the type.

aa)

Check InjectionTarget is provided.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testObtainingInjectionTarget()fisheye|svn
ab)

Check IllegalArgumentException is thrown.

Coverage

No tests exist for this assertion

Section 11.3.20 - Obtaining a Producer for a field or method

The method BeanManager.createProducer() returns a container provided implementation of Producer for a given AnnotatedMethod or AnnotatedField or throws an IllegalArgumentException if there is a definition error associated with the producer method or field.

a)

Test that the method BeanManager.createProducer() returns a container provided implementation of Producer for a given AnnotatedMethod.

Coverage

No tests exist for this assertion

b)

Test that the method BeanManager.createProducer() returns a container provided implementation of Producer for a given AnnotatedField.

Coverage

No tests exist for this assertion

c)

Test that the method BeanManager.createProducer() throws an IllegalArgumentException if there is a definition error associated with the producer method or field.

Coverage

No tests exist for this assertion

Section 11.3.21 - Obtaining an InjectionPoint

The method BeanManager.createInjectionPoint() returns a container provided implementation of InjectionPoint for a given AnnotatedField or AnnotatedParameter or throws an IllegalArgumentException if there is a definition error associated with the injection point.

a)

Test that the method BeanManager.createInjectionPoint() returns a container provided implementation of InjectionPoint for a given AnnotatedField.

Coverage

No tests exist for this assertion

b)

Test that the method BeanManager.createInjectionPoint() returns a container provided implementation of InjectionPoint for a given AnnotatedParameter.

Coverage

No tests exist for this assertion

c)

Test that the method BeanManager.createInjectionPoint() throws an IllegalArgumentException if there is a definition error associated with the injection point.

Coverage

No tests exist for this assertion

Section 11.3.22 - Obtaining a BeanAttributes

The method BeanManager.createBeanAttributes() returns a container provided implementation of BeanAttributes by reading the annotations of a given AnnotatedType or AnnotatedMember, according to the rules define in Chapter 2, Concepts, or throws an IllegalArgumentException if there is a definition error associated with the declared bean attributes.

a)

Test that the method BeanManager.createBeanAttributes() returns a container provided implementation of BeanAttributes by reading the annotations of a given AnnotatedType.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager.beanAttributes
CreateBeanAttributesTest.testBeanAttributesForManagedBean()fisheye|svn
CreateBeanAttributesTest.testBeanAttributesForManagedBeanWithModifiedAnnotatedType()fisheye|svn
CreateBeanAttributesTest.testBeanAttributesForSessionBean()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.synthetic
ProcessBeanAttributesFiredForSyntheticBeanTest.testProcessBeanAttributesFired()fisheye|svn
b)

Test that the method BeanManager.createBeanAttributes() returns a container provided implementation of BeanAttributes by reading the annotations of a given AnnotatedMember.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager.beanAttributes
CreateBeanAttributesTest.testBeanAttributesForMethod()fisheye|svn
CreateBeanAttributesTest.testBeanAttributesForField()fisheye|svn
c)

Test that the method BeanManager.createBeanAttributes() throws an IllegalArgumentException if there is a definition error associated with the declared bean attributes.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager.beanAttributes
CreateBeanAttributesTest.testInvalidMember()fisheye|svn

Section 11.3.23 - Obtaining a Bean

The method BeanManager.createBean() returns a container provided implementation of Bean. The method accepts a BeanAttributes, which determines the bean types, qualifiers, scope, name and stereotypes of the returned Bean, and the return values of isAlternative() and isNullable(), and a class, which determines the return value of Bean.getClass().

a)

Test the first version of the method BeanManager.createBean() that also accepts an InjectionTarget, which is used to create and destroy instances of the bean, to perform dependency injection and lifecycle callbacks, and which determines the return value of Bean.getInjectionPoints().

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager.bean
SyntheticBeanTest.testRegisteredBean()fisheye|svn
SyntheticBeanTest.testSerializableBean()fisheye|svn
SyntheticBeanTest.testSyntheticDecorator()fisheye|svn
b)

Test the second version of the method BeanManager.createBean() that also accepts a Producer, which is used to create and destroy instances of the bean, and which determines the return value of Bean.getInjectionPoints().

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager.bean
SyntheticBeanTest.testSyntheticProducerField()fisheye|svn
SyntheticBeanTest.testSyntheticProducerMethod()fisheye|svn

Section 11.3.24 - Obtaining the instance of an Extension

The method BeanManager.getExtension() returns the container's instance of an Extension class declared in META-INF/services, or throws an IllegalArgumentException if the container has no instance of the given class.

a)

Test that the method BeanManager.getExtension() returns the container's instance of an Extension class declared in META-INF/services.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testGetExtension()fisheye|svn
b)

Test that the method BeanManager.getExtension() throws an IllegalArgumentException if the container has no instance of the given class.

Coverage

org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest.testGetExtension()fisheye|svn

Section 11.4 - Alternative metadata sources

a)

The interfaces AnnotatedType, AnnotatedField, AnnotatedMethod, AnnotatedConstructor and AnnotatedParameter in the package javax.enterprise.inject.spi allow a portable extension to specify metadata that overrides the annotations that exist on a bean class. The portable extension is responsible for implementing the interfaces, thereby exposing the metadata to the container.

The interface javax.enterprise.inject.spi.AnnotatedType exposes the Class object and members.

aaa)

Test that getConstructors() returns all the constructors declared for the type.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated
AlternativeMetaDataTest.testConstructors()fisheye|svn
aab)

Test that getMethods() returns all the methods declared on the type and those declared on any supertypes.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated
AlternativeMetaDataTest.testMethods()fisheye|svn
aac)

Test that getFields() returns all the fields declared on the type and those declared on any supertypes.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated
AlternativeMetaDataTest.testFields()fisheye|svn

The interface javax.enterprise.inject.spi.Annotated exposes the overriding annotations and type declarations.

c)

getBaseType() returns the type of the program element.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated
AlternativeMetaDataTest.testBaseType()fisheye|svn
d)

getTypeClosure() returns all types to which the base type should be considered assignable.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated
AlternativeMetaDataTest.testTypeClosure()fisheye|svn
e)

getAnnotation() returns the program element annotation of the given annotation type, or a null value.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated
AlternativeMetaDataTest.testGetAnnotation()fisheye|svn
f)

getAnnotations() returns all annotations of the program element.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated
AlternativeMetaDataTest.testGetAnnotations()fisheye|svn
g)

isAnnotationPresent() returns true if the program element has an annotation of the given annotation type, or false otherwise.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated
AlternativeMetaDataTest.testIsAnnotationPresent()fisheye|svn
ga)

If the Annotated represents a type, then the annotations returned should include all annotations on the type and it's super types regardless of whether the annotation is marked @Inherited.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated
AlternativeMetaDataTest.testGetAnnotations()fisheye|svn

The container must use the operations of Annotated and its subinterfaces to discover program element types and annotations. The container must not directly call the Java Reflection API. In particular, the container must call Annotated.getBaseType() to determine the type of an injection point, event parameter or disposed parameter, call Annotated.getTypeClosure() to determine the bean types of any kind of bean, call Annotated.getAnnotations() to determine the scope, qualifiers, stereotypes and interceptor bindings of a bean, call Annotated.isAnnotationPresent() and Annotated.getAnnotation() to read any bean annotations defined by this specification, and call AnnotatedType.getConstructors(), AnnotatedType.getMethods() and AnnotatedType.getFields() to determine the members of a bean class.

h)

Check that the container uses the operations of Annotated and its subinterfaces to discover program element types and annotations. and that the container does not use the Java Reflection API.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testContainerUsesOperationsOfAnnotatedNotReflectionApi()fisheye|svn
ha)

Check that getBaseType() is used to determine the type of a field injection point. The base type should be different from the orignal type specified in the class definition

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testGetBaseTypeUsedToDetermineTypeOfInjectionPoint()fisheye|svn
hb)

Check that getBaseType() is used to determine the type of an initializer method injection point. The base type should be different from the orignal type specified in the class definition

Coverage

No tests exist for this assertion

hc)

Check that getBaseType() is used to determine the type of a constructor injection point. The base type should be different from the orignal type specified in the class definition

Coverage

No tests exist for this assertion

hd)

Check that getBaseType() is used to determine the type of a producer method injection point. The base type should be different from the orignal type specified in the class definition

Coverage

No tests exist for this assertion

he)

Check that getBaseType() is used to determine the type of a observer method injection point. The base type should be different from the orignal type specified in the class definition

Coverage

No tests exist for this assertion

hf)

Check that getBaseType() is used to determine the type of a disposer method injection point. The base type should be different from the orignal type specified in the class definition

Coverage

No tests exist for this assertion

i)

Check that getBaseType() is used to determine the type of an event parameter. The base type should be different from the orignal type specified in the class definition

Coverage

No tests exist for this assertion

j)

Check that getBaseType() is used to determine the type of disposed parameter. The base type should be different from the orignal type specified in the class definition

Coverage

No tests exist for this assertion

ka)

Check that a getTypeClosure() is used to determine the bean types for a managed bean. The type closure should be different from the orignal type specified in the class definition.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testGetTypeClosureUsed()fisheye|svn
kb)

Check that a getTypeClosure() is used to determine the bean types for a session bean. The type closure should be different from the orignal type specified in the class definition.

Coverage

No tests exist for this assertion

kc)

Check that a getTypeClosure() is used to determine the bean types for a producer field. The type closure should be different from the orignal type specified in the class definition.

Coverage

No tests exist for this assertion

kd)

Check that a getTypeClosure() is used to determine the bean types for a producer method. The type closure should be different from the orignal type specified in the class definition.

Coverage

No tests exist for this assertion

l)

Check that getAnnotations() is used to determine the bean scope. The annotations should be different from the orignal type specified in the class definition.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testGetAnnotationUsedForGettingScopeInformation()fisheye|svn
m)

Check that getAnnotations() is used to determine the bean qualifiers. The annotations should be different from the orignal type specified in the class definition.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testGetAnnotationUsedForGettingQualifierInformation()fisheye|svn
n)

Check that getAnnotations() is used to determine the bean stereotypes. The annotations should be different from the orignal type specified in the class definition.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testGetAnnotationUsedForGettingStereotypeInformation()fisheye|svn
p)

Check that getAnnotations() is used to determine the bean interceptors. The annotations should be different from the orignal type specified in the class definition.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testGetAnnotationUsedForGettingInterceptorInformation()fisheye|svn
q)

Check that isAnnotationPresent() returns the provided annotations

r)

Check that a previously non-inject-annotated constructor is used by the container to instantiate a bean.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testPreviouslyNonInjectAnnotatedConstructorIsUsed()fisheye|svn
s)

Check that a qualifier added to a parameter is used by the container to instantiate a bean.

Coverage

No tests exist for this assertion

t)

Check that a previously non-inject-annotated field is injected.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testPreviouslyNonInjectAnnotatedFieldIsInjected()fisheye|svn
u)

Check that an extra qualifier is applied.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testExtraQualifierIsAppliedToInjectedField()fisheye|svn
v)

Check that @Produces added creates a producer field.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testProducesCreatesProducerField()fisheye|svn
w)

Check that a previously non-inject-annotated method is injected.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testInjectCreatesInitializerMethod()fisheye|svn
x)

Check that an extra qualifier is applied to an injectable method

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testQualifierAddedToInitializerParameter()fisheye|svn
y)

Check that @Produces added creates a producer method

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testProducesCreatesProducerMethod()fisheye|svn
z)

Check that an extra qualifier is applied to a producer method.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testQualifierIsAppliedToProducerMethod()fisheye|svn
aa)

Check that a qualifer added to a producer method parameter is applied.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testQualifierIsAppliedToProducerMethodParameter()fisheye|svn
ab)

Check that @Disposes added to a parameter creates a disposes method

Coverage

No tests exist for this assertion

ac)

Check that an extra qualifier is applied to a disposes method parameter.

Coverage

No tests exist for this assertion

ad)

Check that a qualifer added to a disposes method injectable parameter is applied.

Coverage

No tests exist for this assertion

ae)

Check that @Observes added to a parameter creates a observer method

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testObserverMethod()fisheye|svn
af)

Check that an extra qualifier is applied to an observes method parameter.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testExtraQualifierAppliedToObservesMethodParameter()fisheye|svn
ag)

Check that a qualifer added to a observes method injectable parameter is applied.

Coverage

org.jboss.jsr299.tck.tests.extensions.alternative.metadata
AlternativeMetadataTest.testObserverMethod()fisheye|svn

Section 11.5 - Container lifecycle events

a)

During the application initialization process, the container fires a series of events, allowing portable extensions to integrate with the container initialization process defined in Section 12.2, "Application initialization lifecycle".

b)

Observer methods of these events must belong to extensions. An extension is a service provider of the service javax.enterprise.inject.spi.Extension declared in META-INF/services.

Coverage

org.jboss.jsr299.tck.tests.deployment.packaging.visibility
VisibilityOfAnnotatedTypesFromExtensionInAlphaBeanArchiveTest.shouldObserveExpectedAnnotatedTypes()fisheye|svn
VisibilityOfAnnotatedTypesFromExtensionInBravoBeanArchiveTest.shouldObserveExpectedAnnotatedTypes()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.interceptors
InterceptorExtensionTest.testInterceptorCalled()fisheye|svn
InterceptorExtensionTest.testLifecycleInterceptor()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.registration
BeanRegistrationByExtensionInNonBeanArchiveTest.shouldFindBeanReference()fisheye|svn
VisibilityOfBeanRegisteredByExtensionFromNonBeanLibraryTest.shouldFindBeanReference()fisheye|svn
bb)

Service providers may have observer methods, which may observer any event, including any container lifecycle event, and obtain an injected BeanManager reference.

Coverage

org.jboss.jsr299.tck.tests.extensions.interceptors
InterceptorExtensionTest.testInterceptorCalled()fisheye|svn
InterceptorExtensionTest.testLifecycleInterceptor()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.registration
BeanRegistrationByExtensionInNonBeanArchiveTest.shouldFindBeanReference()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.lifecycle
ExtensionLifecycleTest.testContainerDeliversEventNotifications()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.registration
VisibilityOfBeanRegisteredByExtensionFromNonBeanLibraryTest.shouldFindBeanReference()fisheye|svn
d)

The container instantiates a single instance of each extension at the beginning of the application initialization process and maintains a reference to it until the application shuts down. The container delivers event notifications to this instance by calling its observer methods.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle
ExtensionLifecycleTest.testContainerInstantiatesSingleInstanceOfExtension()fisheye|svn
ExtensionLifecycleTest.testContainerDeliversEventNotifications()fisheye|svn
e)

For each service provider, the container must provide a bean of scope @ApplicationScoped and qualifier @Default, supporting injection of a reference to the service provider instance. The bean types of this bean include the class of the service provider and all superclases and interfaces.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle
ExtensionLifecycleTest.testContainerProvidesBeanForExtension()fisheye|svn
ExtensionLifecycleTest.testContainerInstantiatesSingleInstanceOfExtension()fisheye|svn
ExtensionLifecycleTest.testContainerDeliversEventNotifications()fisheye|svn

Section 11.5.1 - BeforeBeanDiscovery event

a)

The container must fire an event before it begins the bean discovery process. The event object must be of type javax.enterprise.inject.spi.BeforeBeanDiscovery.

Coverage

org.jboss.jsr299.tck.tests.deployment.lifecycle
ExtensionsTest.testBeforeBeanDiscoveryEventIsCalled()fisheye|svn
ab)

addQualifier() declares an annotation type as a qualifier type.

Coverage

org.jboss.jsr299.tck.tests.deployment.lifecycle
ExtensionsTest.testAddingBindingType()fisheye|svn
ac)

addScope() declares an annotation type as a scope type.

Coverage

org.jboss.jsr299.tck.tests.deployment.lifecycle
ExtensionsTest.testAddingScopeType()fisheye|svn
org.jboss.jsr299.tck.tests.deployment.lifecycle.broken.normalScope
AddingNormalScopeTest.testAddingScopeType()fisheye|svn
org.jboss.jsr299.tck.tests.deployment.lifecycle.broken.passivatingScope
AddingPassivatingScopeTest.testAddingScopeType()fisheye|svn
ad)

addStereotype() declares an annotation type as a stereotype, and specifies its meta-annotations.

Coverage

org.jboss.jsr299.tck.tests.extensions.stereotype
StereotypeExtensionTest.testStereotypeWorks()fisheye|svn
ae)

addInterceptorBinding() declares an annotation type as an interceptor binding type, and specifies its meta-annotations.

Coverage

org.jboss.jsr299.tck.tests.extensions.interceptors
InterceptorExtensionTest.testInterceptorCalled()fisheye|svn
InterceptorExtensionTest.testLifecycleInterceptor()fisheye|svn

addAnnotatedType() adds a given AnnotatedType to the set of types which will be scanned during bean discovery. More than one AnnotatedType may use the same base type, and the container must consider these as different types.

af)

Test the addAnnotatedType() method.

Coverage

org.jboss.jsr299.tck.tests.extensions.registration
BeanRegistrationByExtensionInNonBeanArchiveTest.shouldFindBeanReference()fisheye|svn
VisibilityOfBeanRegisteredByExtensionFromNonBeanLibraryTest.shouldFindBeanReference()fisheye|svn
afa)

Test that more than one AnnotatedType may use the same base type.

Coverage

No tests exist for this assertion

ag)

If any observer method of the BeforeBeanDiscovery event throws an exception, the exception is treated as a definition error by the container.

Coverage

org.jboss.jsr299.tck.tests.deployment.lifecycle.broken.beanDiscoveryMethodThrowsException
BeforeBeanDiscoveryThrowsExceptionTest.testThrowsException()fisheye|svn

Section 11.5.2 - AfterBeanDiscovery event

a)

The container must fire a second event when it has fully completed the bean discovery process, validated that there are no definition errors relating to the discovered beans, and registered Bean and ObserverMethod objects for the discovered beans, but before detecting deployment problems. The event object must be of type javax.enterprise.inject.spi.AfterBeanDiscovery.

Coverage

org.jboss.jsr299.tck.tests.deployment.lifecycle
DeploymentTest.testDeployedManagerEvent()fisheye|svn
ca)

addDefinitionError() registers a definition error with the container, causing the container to abort deployment after all observers have been notified.

Coverage

org.jboss.jsr299.tck.tests.deployment.lifecycle.broken.addDefinitionError
AddDefinitionErrorTest.testObserverDefinitionErrorTreatedAsDefinitionError()fisheye|svn

addBean() fires an event of type ProcessBean containing the given Bean and then registers the Bean with the container, thereby making it available for injection into other beans. The given Bean may implement Interceptor or Decorator.

da)

Check that ProcessBean is fired

Coverage

org.jboss.jsr299.tck.tests.extensions.afterBeanDiscovery
AfterBeanDiscoveryTest.testProcessBeanIsFired()fisheye|svn
db)

Check that a bean is registered

Coverage

org.jboss.jsr299.tck.tests.extensions.afterBeanDiscovery
AfterBeanDiscoveryTest.testBeanIsAdded()fisheye|svn
dc)

Check that a decorator is registered

Coverage

org.jboss.jsr299.tck.tests.decorators.custom
CustomDecoratorTest.testCustomImplementationOfDecoratorInterface()fisheye|svn
dd)

Check that an interceptor is registered

Coverage

org.jboss.jsr299.tck.tests.extensions.interceptors.custom
CustomInterceptorRegistrationTest.testCustomInterceptorRegistration()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.synthetic.interceptor
SyntheticInterceptorVetoedTest.testSyntheticInterceptorBeanCanBeVetoed()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.interceptors.custom
CustomInterceptorInvocationTest.testCustomInterceptorInvocation()fisheye|svn
org.jboss.jsr299.tck.tests.interceptors.definition.custom
CustomInterceptorTest.testCustomPostConstructInterceptor()fisheye|svn
CustomInterceptorTest.testCustomPreDestroyInterceptor()fisheye|svn
CustomInterceptorTest.testCustomPostActivateInterceptor()fisheye|svn
CustomInterceptorTest.testCustomPrePassivateInterceptor()fisheye|svn
CustomInterceptorTest.testCustomAroundInvokeInterceptor()fisheye|svn
CustomInterceptorTest.testCustomAroundTimeoutInterceptor()fisheye|svn

addObserverMethod() fires an event of type ProcessObserverMethod containing the given ObserverMethod and then registers the ObserverMethod with the container, thereby making it available for event notifications.

ea)

Check that the ProcessObserverMethod is fired

Coverage

org.jboss.jsr299.tck.tests.extensions.afterBeanDiscovery
AfterBeanDiscoveryTest.testProcessObserverMethodFiredWhileAddingObserverMethod()fisheye|svn
eb)

Check that the observer method is registered

Coverage

org.jboss.jsr299.tck.tests.extensions.afterBeanDiscovery
AfterBeanDiscoveryTest.testObserverMethodRegistered()fisheye|svn
f)

addContext() registers a custom Context object with the container.

Coverage

No tests exist for this assertion

fb)

A portable extension may take advantage of this event to register beans, interceptors, decorators, observer methods and custom context objects with the container.

g)

If any observer method of the AfterBeanDiscovery event throws an exception, the exception is treated as a definition error by the container.

Coverage

org.jboss.jsr299.tck.tests.deployment.lifecycle.broken.exceptionInAfterBeanDiscoveryObserver
AfterBeanDiscoveryObserverExecutionFailureTest.testObserverFailureTreatedAsDefinitionError()fisheye|svn

Section 11.5.3 - AfterDeploymentValidation event

a)

The container must fire a third event after it has validated that there are no deployment problems and before creating contexts or processing requests. The event object must be of type javax.enterprise.inject.spi.AfterDeploymentValidation.

Coverage

org.jboss.jsr299.tck.tests.deployment.lifecycle
DeploymentTest.testDeployedManagerEvent()fisheye|svn
b)

addDeploymentProblem() registers a deployment problem with the container, causing the container to abort deployment after all observers have been notified.

Coverage

org.jboss.jsr299.tck.tests.deployment.lifecycle.broken.addDeploymentProblem
AddDeploymentProblemTest.testObserverDeploymentProblemTreatedAsDeploymentError()fisheye|svn
c)

If any observer method of the AfterDeploymentValidation event throws an exception, the exception is treated as a deployment problem by the container.

Coverage

org.jboss.jsr299.tck.tests.deployment.lifecycle.broken.exceptionInAfterBeanValidationObserver
AfterDeploymentValidationObserverExecutionFailureTest.testObserverFailureTreatedAsDeploymentError()fisheye|svn
d)

The container must not allow any request to be processed by the deployment until all observers of this event return.

Coverage

No tests exist for this assertion

Section 11.5.4 - BeforeShutdown event

a)

The container must fire a final event after it has finished processing requests and destroyed all contexts. The event object must be of type javax.enterprise.inject.spi.BeforeShutdown.

Coverage

No tests exist for this assertion

ba)

If any observer method of the BeforeShutdown event throws an exception, the exception is ignored by the container.

Coverage

No tests exist for this assertion

Section 11.5.5 - ProcessModule event

a)

The container must fire an event for each bean deployment archive, before it processes the classes packaged in that module. The event object must be of type javax.enterprise.inject.spi.ProcessModule.

Coverage

org.jboss.jsr299.tck.tests.extensions.modules
SingleModuleProcessingTest.testProcessedModulesCount()fisheye|svn
MultiModuleProcessingTest.testProcessedModulesCount()fisheye|svn
ba)

getAlternatives() returns the set of enabled alternatives of the bean deployment archive.

Coverage

org.jboss.jsr299.tck.tests.extensions.modules
SingleModuleProcessingTest.testAlternatives()fisheye|svn
bb)

getInterceptors() returns the list of enabled interceptors of the bean deployment archive.

Coverage

org.jboss.jsr299.tck.tests.extensions.modules
SingleModuleProcessingTest.testInterceptors()fisheye|svn
bc)

getDecorators() returns the list of enabled decorators of the bean deployment archive.

Coverage

org.jboss.jsr299.tck.tests.extensions.modules
SingleModuleProcessingTest.testDecorators()fisheye|svn
bd)

getAnnotatedTypes() returns an iterator over AnnotatedType objects representing the Java classes and interfaces in the bean archive.

Coverage

org.jboss.jsr299.tck.tests.extensions.modules
SingleModuleProcessingTest.testAnnotatedTypes()fisheye|svn
be)

getBeansXml() returns an input stream which can be used to read in the beans.xml for this module.

Coverage

org.jboss.jsr299.tck.tests.extensions.modules
SingleModuleProcessingTest.testBeansXml()fisheye|svn

Any observer of this event is permitted to add classes to, or remove classes from, the set of alternatives, list of interceptors or list of decorators. The container must use the final values of these collections, after all observers have been called, to determine the enabled alternatives, interceptors, and decorators for the bean deployment archive. The initial values of these collections is determined by reading the beans.xml file of the bean deployment archive.

ca)

Check observer is permitted to add classes to the set of alternatives and the container reflects this operation.

Coverage

org.jboss.jsr299.tck.tests.extensions.modules
SingleModuleProcessingTest.testAlternatives()fisheye|svn
cb)

Check observer is permitted to remove classes from the set of alternatives and the container reflects this operation.

Coverage

org.jboss.jsr299.tck.tests.extensions.modules
SingleModuleProcessingTest.testAlternatives()fisheye|svn
cc)

Check observer is permitted to add classes to the list of interceptors and the container reflects this operation.

Coverage

org.jboss.jsr299.tck.tests.extensions.modules
SingleModuleProcessingTest.testInterceptors()fisheye|svn
cd)

Check observer is permitted to remove classes from the list of interceptors and the container reflects this operation.

Coverage

org.jboss.jsr299.tck.tests.extensions.modules
SingleModuleProcessingTest.testInterceptors()fisheye|svn
ce)

Check observer is permitted to add classes to the list of decorators and the container reflects this operation.

Coverage

org.jboss.jsr299.tck.tests.extensions.modules
SingleModuleProcessingTest.testDecorators()fisheye|svn
cf)

Check observer is permitted to remove classes from the list of decorators and the container reflects this operation.

Coverage

org.jboss.jsr299.tck.tests.extensions.modules
SingleModuleProcessingTest.testDecorators()fisheye|svn
cg)

Check the initial values are determined by reading the beans.xml file of the bean deployment archive.

Coverage

org.jboss.jsr299.tck.tests.extensions.modules
MultiModuleProcessingTest.test()fisheye|svn
d)

If any observer method of a ProcessModule event throws an exception, the exception is treated as a deployment problem by the container.

Coverage

org.jboss.jsr299.tck.tests.extensions.modules.broken
ProblematicExtensionTest.testDeployment()fisheye|svn
e)

If the final list of enabled interceptors of the bean deployment archive contains duplicate elements, the container automatically detects the problem and treats it as a deployment problem.

Coverage

org.jboss.jsr299.tck.tests.extensions.modules.broken
DuplicateInterceptorTest.testDeployment()fisheye|svn
f)

If the final list of enabled decorators of the bean deployment archive contains duplicate elements, the container automatically detects the problem and treats it as a deployment problem.

Coverage

org.jboss.jsr299.tck.tests.extensions.modules.broken
DuplicateDecoratorTest.testDeployment()fisheye|svn

Section 11.5.6 - ProcessAnnotatedType event

The container must fire an event for each Java class or interface it discovers in a bean archive and for annotated type added by BeforeBeanDiscovery.addAnnotatedType(), before it reads the declared annotations.. The event object must be of type javax.enterprise.inject.spi.ProcessAnnotatedType<X>, where X is the class, for classes and interfaces discovered in a bean archive, or of type javax.enterprise.inject.spi.ProcessSyntheticAnnotatedType<X> for classes and interfaces added by BeforeBeanDiscovery.addAnnotatedType().

a)

Test for classes and interfaces discovered in a bean archive.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated
ProcessAnnotatedTypeTest.testProcessAnnotatedTypeEventsSent()fisheye|svn
aa)

Test for classes and interfaces added by BeforeBeanDiscovery.addAnnotatedType().

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated.synthetic
ProcessSyntheticAnnotatedTypeTest.testEventsFired()fisheye|svn
ba)

getAnnotatedType() returns the AnnotatedType object that will be used by the container to read the declared annotations.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated
ProcessAnnotatedTypeTest.testGetAnnotatedType()fisheye|svn
bb)

setAnnotatedType() replaces the AnnotatedType.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated
ProcessAnnotatedTypeTest.testSetAnnotatedType()fisheye|svn
bc)

veto() forces the container to ignore the type.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated
ProcessAnnotatedTypeTest.testVeto()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.synthetic
ProcessBeanAttributesFiredForSyntheticBeanTest.testProcessBeanAttributesFired()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.synthetic.interceptor
SyntheticInterceptorVetoedTest.testSyntheticInterceptorBeanCanBeVetoed()fisheye|svn
org.jboss.jsr299.tck.tests.decorators.custom
CustomDecoratorTest.testCustomImplementationOfDecoratorInterface()fisheye|svn
bd)

getSource() returns the Extension instance that added the annotated type.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated.synthetic
ProcessSyntheticAnnotatedTypeTest.testEventsSources()fisheye|svn
ca)

Any observer of this event is permitted to wrap and/or replace the AnnotatedType. The container must use the final value of this property, after all observers have been called, as the only source of types and annotations for the the program elements.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated
ProcessAnnotatedTypeTest.testSetAnnotatedType()fisheye|svn
e)

If any observer method of a ProcessAnnotatedType event throws an exception, the exception is treated as a definition error by the container.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated.broken.processAnnotatedObserverThrowsException
ProcessAnnotatedTypeEventThrowsExceptionTest.testProcessAnnotatedTypeEventThrowsExceptionNotOk()fisheye|svn

Section 11.5.7 - ProcessInjectionPoint event

a)

The container must fire an event for every injection point of every Java EE component class supporting injection that may be instantiated by the container at runtime. The event object must be of type javax.enterprise.inject.spi.ProcessInjectionPoint<T, X> where T is the bean class of the bean that declares the injection point, and X is the declared type of the injection point.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processInjectionPoint.modify
InjectionPointOverridingTest.testOverridingFieldInjectionPoint()fisheye|svn
InjectionPointOverridingTest.testDelegateInjectionPoint()fisheye|svn
InjectionPointOverridingTest.testNewInjectionPointDiscovered()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.lifecycle.processInjectionPoint
ProcessInjectionPointFiredTest.testFieldInjectionPoint()fisheye|svn
ProcessInjectionPointFiredTest.testConstructorInjectionPoint()fisheye|svn
ProcessInjectionPointFiredTest.testInitializerInjectionPoint()fisheye|svn
ProcessInjectionPointFiredTest.testProducerMethodInjectionPoint1()fisheye|svn
ProcessInjectionPointFiredTest.testProducerMethodInjectionPoint2()fisheye|svn
ba)

getInjectionPoint() returns the InjectionPoint object that will be used by the container to perform injection.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processInjectionPoint
ProcessInjectionPointFiredTest.testFieldInjectionPoint()fisheye|svn
ProcessInjectionPointFiredTest.testConstructorInjectionPoint()fisheye|svn
ProcessInjectionPointFiredTest.testInitializerInjectionPoint()fisheye|svn
ProcessInjectionPointFiredTest.testProducerMethodInjectionPoint1()fisheye|svn
ProcessInjectionPointFiredTest.testProducerMethodInjectionPoint2()fisheye|svn
bb)

setInjectionPoint() replaces the InjectionPoint.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processInjectionPoint.modify
InjectionPointOverridingTest.testOverridingFieldInjectionPoint()fisheye|svn
InjectionPointOverridingTest.testDelegateInjectionPoint()fisheye|svn
InjectionPointOverridingTest.testNewInjectionPointDiscovered()fisheye|svn
bc)

addDefinitionError() registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processInjectionPoint.broken
AddDefinitionErrorTest.testDeployment()fisheye|svn
c)

Any observer of this event is permitted to wrap and/or replace the InjectionPoint. The container must use the final value of this property, after all observers have been called, whenever it performs injection upon the injection point.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processInjectionPoint.modify
InjectionPointOverridingTest.testOverridingFieldInjectionPoint()fisheye|svn
InjectionPointOverridingTest.testDelegateInjectionPoint()fisheye|svn
InjectionPointOverridingTest.testNewInjectionPointDiscovered()fisheye|svn
d)

If any observer method of a ProcessInjectionPoint event throws an exception, the exception is treated as a definition error by the container.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processInjectionPoint.broken
ThrowExceptionTest.testDeployment()fisheye|svn

Section 11.5.8 - ProcessInjectionTarget event

The container must fire an event for every Java EE component class supporting injection that may be instantiated by the container at runtime, including every managed bean declared using @ManagedBean, EJB session or message-driven bean, enabled bean, enabled interceptor or enabled decorator. The event object must be of type javax.enterprise.inject.spi.ProcessInjectionTarget<X>, where x is the managed bean class, session bean class or Java EE component class supporting injection.

aaa)

Test event is fired for a managed bean

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testProcessInjectionTargetFiredForManagedBean()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testInjectionTargetInject()fisheye|svn
aab)

Test event is fired for a session bean

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testProcessInjectionTargetFiredForSessionBean()fisheye|svn
aaba)

Test event is fired for a message driven bean

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.jms
ContainerEventTest.testProcessInjectionTargetEventFiredForMessageDrivenBean()fisheye|svn
aac)

Test event is fired for a servlet listener

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessInjectionTargetEventFiredForServletListener()fisheye|svn
aad)

Test event is fired for a tag handler

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessInjectionTargetEventFiredForTagHandler()fisheye|svn
aae)

Test event is fired for a tag library listener

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessInjectionTargetEventFiredForTagLibraryListener()fisheye|svn
aaf)

Test event is fired for an EJB Interceptor

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testProcessInjectionTargetFiredForSessionBeanInterceptor()fisheye|svn
aag)

Test event is fired for a WS endpoint

Coverage

No tests exist for this assertion

aah)

Test event is fired for a servlet

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessInjectionTargetEventFiredForServlet()fisheye|svn
aai)

Test event is fired for a filter

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessInjectionTargetEventFiredForFilter()fisheye|svn
aal)

Test type for a managed bean

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testTypeOfProcessInjectionTargetParameter()fisheye|svn
aam)

Test type for a session bean

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testTypeOfProcessInjectionTargetParameter()fisheye|svn
aan)

Test type for a servlet listener

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testTypeOfProcessInjectionTargetParameter()fisheye|svn
aao)

Test type for a tag handler

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testTypeOfProcessInjectionTargetParameter()fisheye|svn
aap)

Test type for a tag library listener

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testTypeOfProcessInjectionTargetParameter()fisheye|svn
aaq)

Test type for an EJB Interceptor

Coverage

No tests exist for this assertion

aar)

Test type for a WS endpoint

Coverage

No tests exist for this assertion

aas)

Test type for a servlet

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testTypeOfProcessInjectionTargetParameter()fisheye|svn
aat)

Test type for a filter

Coverage

No tests exist for this assertion

getAnnotatedType() returns the AnnotatedType representing the managed bean class, session bean or other Java EE component class supporting injection.

aba)

Test type for a managed bean

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testGetAnnotatedTypeOnProcessInjectionTarget()fisheye|svn
abb)

Test type for a session bean

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testProcessInjectionTargetFiredForSessionBean()fisheye|svn
abba)

Test type for a message driven bean

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.jms
ContainerEventTest.testProcessInjectionTargetEventFiredForMessageDrivenBean()fisheye|svn
abc)

Test type for a servlet listener

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessInjectionTargetEventFiredForServletListener()fisheye|svn
abd)

Test type for a tag handler

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessInjectionTargetEventFiredForTagHandler()fisheye|svn
abe)

Test type for a tag library listener

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessInjectionTargetEventFiredForTagLibraryListener()fisheye|svn
abf)

Test type for an EJB Interceptor

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testProcessInjectionTargetFiredForSessionBeanInterceptor()fisheye|svn
abg)

Test type for a WS endpoint

Coverage

No tests exist for this assertion

abh)

Test type for a servlet

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessInjectionTargetEventFiredForServlet()fisheye|svn
abi)

Test type for a filter

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessInjectionTargetEventFiredForFilter()fisheye|svn
ba)

getInjectionTarget() returns the InjectionTarget object that will be used by the container to perform injection.

Coverage

No tests exist for this assertion

bb)

setInjectionTarget() replaces the InjectionTarget.

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testSettingInjectionTargetReplacesIt()fisheye|svn
da)

addDefinitionError() registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.

Coverage

org.jboss.jsr299.tck.tests.extensions.producer.broken.injectionTargetError
InjectionTargetDefinitionErrorTest.testAddingDefinitionError()fisheye|svn

Any observer of this event is permitted to wrap and/or replace the InjectionTarget. The container must use the final value of this property, after all observers have been called, whenever it performs injection upon the managed bean, session bean or other Java EE component class supporting injection.

ea)

Test type for a managed bean

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testSettingInjectionTargetReplacesIt()fisheye|svn
eb)

Test type for a session bean

Coverage

No tests exist for this assertion

ec)

Test type for a servlet listener

Coverage

No tests exist for this assertion

ed)

Test type for a tag handler

Coverage

No tests exist for this assertion

ee)

Test type for a tag library listener

Coverage

No tests exist for this assertion

ef)

Test type for an EJB Interceptor

Coverage

No tests exist for this assertion

eg)

Test type for a WS endpoint

Coverage

No tests exist for this assertion

eh)

Test type for a servlet

Coverage

No tests exist for this assertion

ei)

Test type for a filter

Coverage

No tests exist for this assertion

f)

If any observer method of a ProcessInjectionTarget event throws an exception, the exception is treated as a definition error by the container.

Coverage

org.jboss.jsr299.tck.tests.extensions.annotated.broken.processInjectionTargetThrowsException
ProcessInjectionTargetEventThrowsExceptionTest.testProcessInjectionTargetEventThrowsExceptionNotOk()fisheye|svn

Section 11.5.9 - ProcessProducer event

The container must fire an event for each producer method or field of each enabled bean, including resources.

aa)

Test producer method

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceCallsProducerMethod()fisheye|svn
ab)

Test producer field

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceAccessesProducerField()fisheye|svn
ac)

Test resource producer field

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceCallsOverridenResourceProducerMethod()fisheye|svn

The event object must be of type javax.enterprise.inject.spi.ProcessProducer<T, X>, where T is the bean class of the bean that declares the producer method or field and X is the return type of the producer method or the type of the producer field.

ba)

Test producer method

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceCallsProducerMethod()fisheye|svn
bb)

Test producer field

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceAccessesProducerField()fisheye|svn

getAnnotatedMember() returns the AnnotatedField representing the producer field or the AnnotatedMethod representing the producer method.

ca)

Test producer method

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceCallsProducerMethod()fisheye|svn
cb)

Test producer field

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceAccessesProducerField()fisheye|svn

getProducer() returns the Producer object that will be used by the container to call the producer method or read the producer field.

da)

Test producer method

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceCallsProducerMethod()fisheye|svn
db)

Test producer field

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceAccessesProducerField()fisheye|svn
e)

setProducer() replaces the Producer.

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceCallsOverridenResourceProducerMethod()fisheye|svn
ProducerTest.testSetProducerOverridesProducer()fisheye|svn
f)

addDefinitionError() registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.

Coverage

org.jboss.jsr299.tck.tests.extensions.producer.broken.processing
ProducerProcessingWithDefinitionErrorTest.testExplicitDefinitionError()fisheye|svn

Any observer of this event is permitted to wrap and/or replace the Producer. The container must use the final value of this property, after all observers have been called, whenever it calls the producer or disposer.

ga)

Test producer method

Coverage

No tests exist for this assertion

gb)

Test producer field

Coverage

No tests exist for this assertion

h)

If any observer method of a ProcessProducer event throws an exception, the exception is treated as a definition error by the container.

Coverage

org.jboss.jsr299.tck.tests.extensions.producer.broken.processing
ProducerProcessingWithExceptionTest.testException()fisheye|svn

Section 11.5.10 - ProcessBeanAttributes event

The container must fire an event for each enabled bean, interceptor or decorator deployed in a bean archive, before registering the Bean object. No event is fired for any @New qualified bean, defined in Section 3.14, "@New qualified beans". The event object must be of type javax.enterprise.inject.spi.ProcessBeanAttributes<T> where T is the bean class of the managed bean or session bean, the return type of the producer method, or the type of the producer field.

aa)

Event is fired for enabled bean.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.synthetic
ProcessBeanAttributesFiredForSyntheticBeanTest.testProcessBeanAttributesFired()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes
VerifyValuesTest.testManagedBeanAttributes()fisheye|svn
VerifyValuesTest.testSessionBeanAttributes()fisheye|svn
VerifyValuesTest.testProducerMethodBeanAttributes()fisheye|svn
VerifyValuesTest.testProducerFieldBeanAttributes()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.specialization.broken
TypeConflictDetectionTest.testDeployment()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.specialization
VetoTest.testSpecializedBeanAvailableAfterSpecializingBeanVetoed()fisheye|svn
SpecializationTest.testProcessBeanAttributesFiredProperlyForSpecializedBean()fisheye|svn
ab)

Event is fired for enabled interceptor.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes
VerifyValuesTest.testInterceptorBeanAttributes()fisheye|svn
ac)

Event is fired for enabled decorator.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes
VerifyValuesTest.testDecoratorBeanAttributes()fisheye|svn
ad)

No event is fired for any @New qualified bean.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes
VerifyValuesTest.testManagedBeanAttributes()fisheye|svn

getAnnotated() returns the AnnotatedType representing the managed bean class or session bean class, the AnnotatedMethod representing the producer field, or the AnnotatedField representing the producer field.

baa)

Test managed bean.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes
VerifyValuesTest.testManagedBeanAnnotated()fisheye|svn
bab)

Test session bean.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes
VerifyValuesTest.testSessionBeanAnnotated()fisheye|svn
VerifyValuesTest.testSessionBeanAttributes()fisheye|svn
bac)

Test producer method.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes
VerifyValuesTest.testProducerMethodAnnotated()fisheye|svn
bad)

Test producer field.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes
VerifyValuesTest.testProducerFieldAnnotated()fisheye|svn
bb)

getBeanAttributes() returns the BeanAttributes object that will be used by the container to manage instances of the bean.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes
VerifyValuesTest.testSessionBeanAttributes()fisheye|svn
VerifyValuesTest.testInterceptorBeanAttributes()fisheye|svn
VerifyValuesTest.testDecoratorBeanAttributes()fisheye|svn
bc)

setBeanAttributes() replaces the BeanAttributes.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.modify
SetBeanAttributesTest.testBeanModified()fisheye|svn
bd)

addDefinitionError() registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.broken
AddDefinitionErrorTest.testDeployment()fisheye|svn
be)

veto() forces the container to ignore the bean.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.veto
VetoTest.testBeanVetoed()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.specialization
VetoTest.testSpecializedBeanAvailableAfterSpecializingBeanVetoed()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.synthetic.interceptor
SyntheticInterceptorVetoedTest.testSyntheticInterceptorBeanCanBeVetoed()fisheye|svn
c)

Any observer of this event is permitted to wrap and/or replace the BeanAttributes. The container must use the final value of this property, after all observers have been called, to manage instances of the bean.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.modify
SetBeanAttributesTest.testBeanModified()fisheye|svn
d)

If any observer method of a ProcessBeanAttributes event throws an exception, the exception is treated as a definition error by the container.

Coverage

org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.broken
ThrowExceptionTest.testDeployment()fisheye|svn

Section 11.5.11 - ProcessBean event

aa)

The container must fire an event for each enabled bean, interceptor or decorator deployed in a bean archive, before registering the Bean object. No event is fired for any @New qualified bean, defined in Section 3.12, "@New qualified beans".

ba)

For a managed bean with bean class X, the container must raise an event of type ProcessManagedBean<X>.

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testProcessManagedBeanFired()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessBeanEvent()fisheye|svn
c)

For a session bean with bean class X, the container must raise an event of type ProcessSessionBean<X>.

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testProcessSessionBeanFiredForStatelessSessionBean()fisheye|svn
ContainerEventTest.testProcessSessionBeanFiredForStatefulSessionBean()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.processBean
ProcessSessionBeanTest.testProcessSessionBeanEvent()fisheye|svn
eaa)

For a producer method with method return type X of a bean with bean class T, the container must raise an event of type ProcessProducerMethod<T, X>.

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessProducerMethodEvent()fisheye|svn
eb)

For a producer field with field type X of a bean with bean class T, the container must raise an event of type ProcessProducerField<T, X>.

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessProducerFieldEvent()fisheye|svn
ec)

Resources are considered to be producer fields.

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testResourceAreConsideredToBeProducerField()fisheye|svn

The interface javax.enterprise.inject.spi.ProcessBean is a supertype of all these event types.

eda)

Test ProcessManagedBean

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessBeanEvent()fisheye|svn
edb)

Test ProcessSessionBean

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessSessionBeanTest.testProcessSessionBeanEvent()fisheye|svn
edc)

Test ProcessProducerMethod

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessProducerMethodEvent()fisheye|svn
edd)

Test ProcessProducerField

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessProducerFieldEvent()fisheye|svn

getAnnotated() returns the AnnotatedType representing the bean class, the AnnotatedMethod representing the producer method, or the AnnotatedField representing the producer field.

efa)

Test ProcessManagedBean

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessBeanEvent()fisheye|svn
efb)

Test ProcessSessionBean

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessSessionBeanTest.testProcessSessionBeanEvent()fisheye|svn
efc)

Test ProcessProducerMethod

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessProducerMethodEvent()fisheye|svn
efd)

Test ProcessProducerField

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessProducerFieldEvent()fisheye|svn

getBean() returns the Bean object that is about to be registered. The Bean may implement Interceptor or Decorator.

fa)

Test ProcessManagedBean

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessBeanEvent()fisheye|svn
fb)

Test ProcessSessionBean

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessSessionBeanTest.testProcessSessionBeanEvent()fisheye|svn
fc)

Test ProcessProducerMethod

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessProducerMethodEvent()fisheye|svn
fd)

Test ProcessProducerField

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessProducerFieldEvent()fisheye|svn
h)

addDefinitionError() registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event.broken.processBeanObserverRegistersException
AddDefinitionErrorTest.testAddDefinitionError()fisheye|svn
hb)

getEjbName() returns the EJB name of the session bean.

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testGetEJBName()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.processBean
ProcessSessionBeanTest.testProcessSessionBeanEvent()fisheye|svn
hc)

getSessionBeanType() returns a javax.enterprise.inject.spi.SessionBeanType representing the kind of session bean.

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testGetSessionBeanType()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.processBean
ProcessSessionBeanTest.testProcessSessionBeanEvent()fisheye|svn
hd)

If any observer method of a ProcessBean event throws an exception, the exception is treated as a definition error by the container.

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event.broken.processBeanObserverThrowsException
ThrowExceptionInProcessBeanObserverTest.testProcessBeanObserverThrowsException()fisheye|svn
The following assertion is not made explicitly by the spec, however it is implied i)

Check the getAnnotatedProducerMethod()

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessProducerMethodEvent()fisheye|svn
The following assertion is not made explicitly by the spec, however it is implied j)

Check the getAnnotatedDisposesParameter()

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessProducerMethodEvent()fisheye|svn
The following assertion is not made explicitly by the spec, however it is implied k)

Check the getAnnotatedSessionBeanClass()

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessSessionBeanTest.testProcessSessionBeanEvent()fisheye|svn

Check the getAnnotatedBeanClass()

The following assertion is not made explicitly by the spec, however it is implied l)

Check for managed bean

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessBeanEvent()fisheye|svn
The following assertion is not made explicitly by the spec, however it is implied m)

Check for session bean

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessSessionBeanTest.testProcessSessionBeanEvent()fisheye|svn
The following assertion is not made explicitly by the spec, however it is implied n)

Check the getAnnotatedProducerField()

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessProducerFieldEvent()fisheye|svn

Section 11.5.12 - ProcessObserverMethod event

aaa)

The container must fire an event for each observer method of each enabled bean, before registering the ObserverMethod object. The event object must be of type javax.enterprise.inject.spi.ProcessObserverMethod<T, X> where T is the bean class of the bean that declares the observer method and X is the observed event type of the observer method.

Coverage

org.jboss.jsr299.tck.tests.extensions.observer
ProcessObserverMethodEventTest.testProcessObserverMethodEventsSent()fisheye|svn
aba)

getAnnotatedEventParameter() returns the AnnotatedParameter representing the event parameter.

Coverage

org.jboss.jsr299.tck.tests.extensions.observer
ProcessObserverMethodEventTest.testGetAnnotatedMethod()fisheye|svn
ba)

getObserverMethod() returns the ObserverMethod object that will be used by the container to call the observer method.

Coverage

org.jboss.jsr299.tck.tests.extensions.observer
ProcessObserverMethodEventTest.testGetObserverMethod()fisheye|svn
da)

addDefinitionError() registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.

Coverage

org.jboss.jsr299.tck.tests.extensions.observer.broken.definitionError
ProcessObserverMethodErrorTest.testAddDefinitionError()fisheye|svn
db)

If any observer method of a ProcessObserverMethod event throws an exception, the exception is treated as a definition error by the container.

Coverage

org.jboss.jsr299.tck.tests.extensions.observer.broken.exception
ProcessObserverMethodExceptionTest.testExceptionIsDefinitionError()fisheye|svn

Section 12.1 - Bean deployment archives

aa)

Bean classes of enabled beans must be deployed in bean archives.

a)

A library jar, EJB jar, application client jar or rar archive is a bean archive if it has a file named beans.xml in the META-INF directory.

ab)

The WEB-INF/classes directory of a war is a bean archive if there is a file named beans.xml in the WEB-INF directory of the war.

ac)

A directory in the JVM classpath is a bean deployment archive if it has a file named beans.xml in the META-INF directory.

b)

The container is not required to support application client jar bean archives.

ba)

The container searches for beans in all bean archives in the application classpath.

In an application deployed as an ear, the container searches every bean archive bundled with or referenced by the ear, including bean archives bundled with or referenced by wars and EJB jars contained in the ear. The bean archives might be library jars, EJB jars, rars or war WEB-INF/classes directories.

bba)

Check an EJB jar in an EAR

Coverage

org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle
EnterpriseBeanLifecycleTest.testCreateSFSB()fisheye|svn
bbb)

Check a bundled library in an EAR

Coverage

org.jboss.jsr299.tck.tests.deployment.packaging.bundledLibrary
LibraryInEarTest.test()fisheye|svn
bbc)

Check a bundled library in a WAR

Coverage

org.jboss.jsr299.tck.tests.deployment.packaging.bundledLibrary
LibraryMissingBeansXmlTest.test()fisheye|svn
org.jboss.jsr299.tck.tests.deployment.packaging.ear
MultiWebModuleWithExtensionTest.testMultipleWebModulesWithExtension()fisheye|svn
SingleWebModuleWithExtensionTest.testSingleWebModuleWithExtension()fisheye|svn
bbd)

Check a rar

Coverage

No tests exist for this assertion

bbe)

Check a war in an ear

Coverage

org.jboss.jsr299.tck.tests.deployment.packaging.ear
MultiWebModuleWithExtensionTest.testMultipleWebModulesWithExtension()fisheye|svn
SingleWebModuleWithExtensionTest.testSingleWebModuleWithExtension()fisheye|svn
bbf)

Check for a jar installed as a library

Coverage

No tests exist for this assertion

In an application deployed as a war, the container searches every bean archive bundled with or referenced by the war. The bean archives might be library jars or the WEB-INF/classes directory.

bca)

Check classes in the war

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testCreateInjectsFieldsDeclaredInJava()fisheye|svn
bcb)

Check bundled libraries in the war

Coverage

org.jboss.jsr299.tck.tests.deployment.packaging.visibility
VisibilityOfBeanInWebModuleFromBeanManagerInBeanLibraryTest.shouldFindBeanByName()fisheye|svn
JarToJarReverseAlphaVisibilityTest.testDeployment()fisheye|svn
JarToJarAlphaVisibilityTest.testDeployment()fisheye|svn
org.jboss.jsr299.tck.tests.deployment.packaging.bundledLibrary
LibraryInWarTest.test()fisheye|svn
bcc)

Check for a jar installed as a library

Coverage

No tests exist for this assertion

In an application deployed as an EJB jar, the container searches the EJB jar, if it is a bean archive, and every bean archive referenced by the EJB jar.

bcd)

Check classes in the jar.

Coverage

No tests exist for this assertion

An embeddable EJB container searches each bean archive in the JVM classpath that is listed in the value of the embeddable container initialization property javax.ejb.embeddable.modules, or every bean archive in the JVM classpath if the property is not specified. The bean archives might be directories, library jars or EJB jars.

bda)

Check modules specified by javax.ejb.embeddable.modules

bdb)

Check libraries

bdc)

Check directories

bda)

Check ejb jars

be)

When searching for beans, the container considers any Java class in any bean archive, any ejb-jar.xml file in the metadata directory of any EJB bean archive, any Java class referenced by the @New qualifier of an injection point of another bean, and any interceptor or decorator class declared in the beans.xml file of any bean archive.

d)

If a bean class is deployed in two different bean archives, non-portable behaviour results. Portable applications must deploy each bean class in no more than one bean archive.

e)

If an enum declaring injection points is defined in installed library jars, non-portable behavior results.

f)

An extension may be deployed in any archive, including those that are not bean archives.

Coverage

org.jboss.jsr299.tck.tests.extensions.registration
BeanRegistrationByExtensionInNonBeanArchiveTest.shouldFindBeanReference()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.manager.provider
CdiProviderIncontainerTest.testAccessingBeanManager()fisheye|svn

Section 12.2 - Application initialization lifecycle

a)

When an application is started, the container performs the following steps.

b)

First, the container must search for service providers for the service javax.enterprise.inject.spi.Extension defined in Section 11.5, "Container lifecycle events", instantiate a single instance of each service provider, and search the service provider class for observer methods of initialization events.

Coverage

org.jboss.jsr299.tck.tests.deployment.lifecycle
ExtensionsTest.testBeforeBeanDiscoveryEventIsCalled()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.alternative.deployment
AlternativeInLibraryWithExtensionTest.testAlternative()fisheye|svn
c)

Next, the container must fire an event of type BeforeBeanDiscovery, as defined in Section 11.5.1, "BeforeBeanDiscovery event".

Coverage

org.jboss.jsr299.tck.tests.deployment.lifecycle.broken.addDefinitionError
AddDefinitionErrorTest.testObserverDefinitionErrorTreatedAsDefinitionError()fisheye|svn
org.jboss.jsr299.tck.tests.deployment.lifecycle
ExtensionsTest.testBeforeBeanDiscoveryEventIsCalled()fisheye|svn

Next, the container must perform bean discovery, and abort initialization of the application if any definition errors exist, as defined in Section 2.8, "Problems detected automatically by the container". Additionally, for every Java EE component class supporting injection that may be instantiated by the container at runtime, the container must create an InjectionTarget for the class, as defined in 11.2, "The Producer and InjectionTarget interfaces", and fire an event of type ProcessInjectionTarget, as defined in Section 11.5.6, "ProcessInjectionTarget event".

da)

Check beans are discovered

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.lifecycle
SimpleBeanLifecycleTest.testManagedBean()fisheye|svn
db)

Check definitions errors occur

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition.constructorHasDisposesParameter
ConstructorHasDisposesParameterTest.testConstructorHasDisposesParameter()fisheye|svn
e)

Next, the container must fire an event of type AfterBeanDiscovery, as defined in Section 11.5.2, "AfterBeanDiscovery event", and abort initialization of the application if any observer registers a definition error.

Coverage

No tests exist for this assertion

f)

Next, the container must detect deployment problems by validating bean dependencies and specialization and abort initialization of the application if any deployment problems exist, as defined in Section 2.8, "Problems detected automatically by the container".

Coverage

No tests exist for this assertion

g)

Next, the container must fire an event of type AfterDeploymentValidation, as defined in Section 11.5.3, "AfterDeploymentValidation event", and abort initialization of the application if any observer registers a deployment problem.

Coverage

org.jboss.jsr299.tck.tests.deployment.lifecycle
DeploymentTest.testDeployedManagerEvent()fisheye|svn
ga)

Next, the container must inject any enums declaring injection points.

Coverage

No tests exist for this assertion

h)

Finally, the container begins directing requests to the application.

Coverage

No tests exist for this assertion

Section 12.3 - Application shutdown lifecycle

When an application is stopped, the container performs the following steps:

a)

First, the container must destroy all contexts.

b)

Next, the container must destroy dependent objects injected into enums.

c)

Finally, the container must fire an event of type BeforeShutdown, as defined in Section 11.5.4, "BeforeShutdown event".

Section 12.4 - Bean discovery

a)

The container automatically discovers managed beans (according to the rules of Section 3.1.1, "Which Java classes are managed beans?") and session beans in bean archives and searches the bean classes for producer methods, producer fields, disposer methods and observer methods.

For each Java class or interface deployed in a bean archive, the container must create an AnnotatedType representing the type and fire an event of type ProcessAnnotatedType, as defined in Section 11.5.5, "ProcessAnnotatedType event".

ba)

Check managed bean

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testProcessAnnotatedTypeFiredForManagedBean()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testInjectionTargetInject()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.annotated
ProcessAnnotatedTypeTest.testProcessAnnotatedTypeEventsSent()fisheye|svn
bb)

Check session bean

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testProcessAnnotatedTypeFiredForSessionBean()fisheye|svn
bc)

Check non-contextual session bean

Coverage

No tests exist for this assertion

bd)

Check JSF managed beans

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessAnnotatedTypeEventFiredForJsfManagedBean()fisheye|svn
be)

Check servlet listener

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessAnnotatedTypeEventFiredForServletListener()fisheye|svn
bf)

Check tag handler

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessAnnotatedTypeEventFiredForTagHandler()fisheye|svn
bg)

Check tag library listener

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessAnnotatedTypeEventFiredForTagLibraryListener()fisheye|svn
bh)

Check EJB Interceptor

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testProcessAnnotatedTypeFiredForSessionBeanInterceptor()fisheye|svn
bi)

Check WS endpoint

Coverage

No tests exist for this assertion

bj)

Check servlet

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessAnnotatedTypeEventFiredForServlet()fisheye|svn
bk)

Check filter

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessAnnotatedTypeEventFiredForFilter()fisheye|svn
c)

For each Java class in any bean archive, the container must inspect the type metadata to determine if it is a bean or other Java EE component class supporting injection.

d)

For each Java class in any bean archive, the container must detect definition errors by validating the class and its metadata.

For each Java class in any bean archive, the container must, if the class is a managed bean, session bean, or other Java EE component class supporting injection, create an InjectionTarget for the class, as defined in Section 11.2, "The Producer and InjectionTarget interfaces", and fire an event of type ProcessInjectionTarget, as defined in Section 11.5.6, "ProcessInjectionTarget event"

da)

Check managed bean

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testProcessInjectionTargetFiredForManagedBean()fisheye|svn
db)

Check session bean

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testProcessInjectionTargetFiredForSessionBean()fisheye|svn
dc)

Check non-contextual session bean

Coverage

No tests exist for this assertion

dd)

Check JSF managed beans

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessInjectionTargetEventFiredForJsfManagedBean()fisheye|svn
de)

Check servlet listener

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessInjectionTargetEventFiredForServletListener()fisheye|svn
df)

Check tag handler

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessInjectionTargetEventFiredForTagHandler()fisheye|svn
dg)

Check tag library listener

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessInjectionTargetEventFiredForTagLibraryListener()fisheye|svn
dh)

Check EJB Interceptor

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testProcessInjectionTargetFiredForSessionBeanInterceptor()fisheye|svn
di)

Check WS endpoint

Coverage

No tests exist for this assertion

dj)

Check servlet

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessInjectionTargetEventFiredForServlet()fisheye|svn
dk)

Check filter

Coverage

org.jboss.jsr299.tck.tests.lookup.injection.non.contextual
ContainerEventTest.testProcessInjectionTargetEventFiredForFilter()fisheye|svn

For each Java class in any bean archive, the container must, if the class is an enabled bean, interceptor or decorator, create a Bean object that implements the rules defined in Section 7.3.1, "Lifecycle of managed beans", Section 7.3.2, "Lifecycle of stateful session beans" or Section 7.3.3, "Lifecycle of stateless session and singleton beans", and fire an event which is a subtype of ProcessBean, as defined in Section 11.5.8, "ProcessBean event".

fa)

Check a managed bean

Coverage

org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessBeanEvent()fisheye|svn
fb)

Check a session bean

Coverage

org.jboss.jsr299.tck.tests.extensions.container.event
ContainerEventTest.testProcessSessionBeanFiredForStatelessSessionBean()fisheye|svn
ContainerEventTest.testProcessSessionBeanFiredForStatefulSessionBean()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.processBean
ProcessSessionBeanTest.testProcessSessionBeanEvent()fisheye|svn

For each enabled bean, the container must search the class for producer methods and fields, including resources, and for each producer method or field create a Producer, as defined in Section 11.2, "The Producer and InjectionTarget interfaces", and fire an event of type ProcessProducer, as defined in Section 11.5.7, "ProcessProducer event", and then if the producer method or field is enabled, create a Bean object that implements the rules defined in Section 7.3.4, "Lifecycle of producer methods", Section 7.3.5, "Lifecycle of producer fields" or Section 7.3.6, "Lifecycle of resources", and fire an event which is a subtype of ProcessBean, as defined in Section 11.5.8, "ProcessBean event".

ha)

Check a producer method

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceCallsProducerMethod()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessProducerMethodEvent()fisheye|svn
hb)

Check a producer field

Coverage

org.jboss.jsr299.tck.tests.extensions.producer
ProducerTest.testProduceAccessesProducerField()fisheye|svn
org.jboss.jsr299.tck.tests.extensions.processBean
ProcessBeanTest.testProcessProducerFieldEvent()fisheye|svn
i)

For each enabled bean, the container must search the class for observer methods, and for each observer method create an ObserverMethod object, as defined in Section 11.1.3, "The ObserverMethod interface" and fire an event of type ProcessObserverMethod, as defined in Section 11.5.9, "ProcessObserverMethod event".

Coverage

No tests exist for this assertion

The container determines which alternatives, interceptors and decorators are enabled, according to the rules defined in Section 5.1.2, "Enabled and disabled beans", Section 9.4, "Interceptor enablement and ordering" and Section 8.2, "Decorator enablement and ordering", taking into account any <enable>, <interceptors> and <decorators> declarations in the beans.xml files, and registers the Bean and ObserverMethod objects.

ka)

Check only beans for enabled policies registered

Coverage

org.jboss.jsr299.tck.tests.alternative
AlternativeAvailabilityTest.testAlternativeAvailability()fisheye|svn
kb)

Check only enabled interceptors registered

Coverage

org.jboss.jsr299.tck.tests.interceptors.invocation
InterceptorInvocationTest.testManagedBeanIsIntercepted()fisheye|svn
kc)

Check only enabled decorators registered

Coverage

org.jboss.jsr299.tck.tests.decorators.definition
DecoratorDefinitionTest.testDecoratorIsManagedBean()fisheye|svn
l)

For each enabled bean that is not an interceptor or decorator, the container registers an instance of the Bean interface defined in Section 11.1, "The Bean interface".

m)

For each enabled interceptor, the container registers an instance of the Interceptor interface as defined in Section 11.1.2, "The Interceptor interface".

n)

For each enabled decorator, the container registers an instance of the Decorator interface defined in Section 11.1.1, "The Decorator interface".

o)

For each observer method of every enabled bean, the container registers an instance of the ObserverMethod interface defined in Section 11.1.3, "The ObserverMethod interface".

Coverage

org.jboss.jsr299.tck.tests.event.observer.resolve
ResolveEventObserversTest.testObserverMethodAutomaticallyRegistered()fisheye|svn
ResolveEventObserversTest.testObserverMethodNotAutomaticallyRegisteredForDisabledBeans()fisheye|svn

Section 12.5 - Integration with Unified EL

a)

The container must provide a Unified EL ELResolver to the servlet engine and JSF implementation that resolves bean EL names using the rules of name resolution defined in 5.3, "EL name resolution" and resolving ambiguities according to Section 5.3.1, "Ambiguous EL names".

Coverage

org.jboss.jsr299.tck.tests.implementation.simple.definition.constructorHasDisposesParameter
ConstructorHasDisposesParameterTest.testConstructorHasDisposesParameter()fisheye|svn
org.jboss.jsr299.tck.tests.lookup.el.integration
IntegrationWithUnifiedELTest.testELResolverRegisteredWithJsf()fisheye|svn
IntegrationWithUnifiedELTest.testELResolverRegisteredWithServletContainer()fisheye|svn
c)

If a name used in an EL expression does not resolve to any bean, the ELResolver must return a null value.

Coverage

org.jboss.jsr299.tck.tests.lookup.el
ResolutionByNameTest.testUnresolvedNameReturnsNull()fisheye|svn
b)

If a name used in an EL expression resolves to more than one bean, the ELResolver must throw an AmbiguousResolutionException.

Coverage

No tests exist for this assertion

d)

Otherwise, if a name used in an EL expression resolves to exactly one bean, the ELResolver must return a contextual instance of the bean, as defined in Section 6.5.2, "Contextual instance of a bean".

Coverage

org.jboss.jsr299.tck.tests.lookup.el
ResolutionByNameTest.testELResolverReturnsContextualInstance()fisheye|svn

Unmatched tests

The following 10 tests do not match any known assertions:

SectionAssertionTest ClassTest Method
12.1 bcb
org.jboss.jsr299.tck.tests.deployment.packaging.visibility
VisibilityOfBeanInWebModuleFromBeanManagerInBeanLibraryTest
shouldFindBeanByType()
11.5.10 bb
org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.synthetic
ProcessBeanAttributesFiredForSyntheticBeanTest
testProcessBeanAttributesFired()
11.5.10 bc
org.jboss.jsr299.tck.tests.extensions.lifecycle.processBeanAttributes.synthetic
ProcessBeanAttributesFiredForSyntheticBeanTest
testProcessBeanAttributesFired()
3.8.1b
org.jboss.jsr299.tck.tests.implementation.producer.field.definition.broken.inject
InjectAnnotatedProducerFieldTest
testInjectAnnotatedProducerFieldNotAllowed()
3.3.8a
org.jboss.jsr299.tck.tests.implementation.producer.method.definition
ProducerMethodDefinitionTest
testDefaultNamedMethod()
3.5.2ad
org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb
EjbInjectionTest
testResourceBeanTypes()
3.5.2aa
org.jboss.jsr299.tck.tests.implementation.simple.resource.env
EnvInjectionTest
testResourceBeanTypes()
3.5.2ab
org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext
PersistenceContextInjectionTest
testBeanTypesAndBindingTypesOfPersistenceContext()
3.5.2ac
org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext
PersistenceContextInjectionTest
testBeanTypesOfPersistenceUnit()
3.5.2aa
org.jboss.jsr299.tck.tests.implementation.simple.resource.resource
InjectionOfResourceTest
testResourceBeanTypes()

Unversioned tests

The following 2 test classes either do not have a version specified, or the version is unrecognized:

Test ClassVersion
org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method.broken.twoBeansSpecializeTheSameBean.TwoBeansSpecializeTheSameBeanTest20091018
org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.broken.twoBeansSpecializeTheSameBean.TwoBeansSpecializeTheSameBeanTest20091018

Highlighted test groups

Test ClassTest method
broken (0)
incontainer-broken (0)
rewrite (15)
org.jboss.jsr299.tck.tests.context.conversation
ClientConversationContextTest
testTransientConversationInstancesDestroyedAtRequestEnd()
org.jboss.jsr299.tck.tests.context.request
RequestContextTest
testRequestScopeIsDestroyedAfterServletRequest()
org.jboss.jsr299.tck.tests.definition.qualifier
QualifierDefinitionTest
testQualifierDeclaresBindingAnnotation()
org.jboss.jsr299.tck.tests.deployment.lifecycle
DeploymentTest
testDeployedManagerEvent()
org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest
testDetermineBindingType()
org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest
testDetermineInterceptorBindingType()
org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest
testDetermineScopeType()
org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest
testDetermineStereotype()
org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest
testGetMetaAnnotationsForInterceptorBindingType()
org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest
testGetMetaAnnotationsForStereotype()
org.jboss.jsr299.tck.tests.extensions.beanManager
BeanManagerTest
testgetScope()
org.jboss.jsr299.tck.tests.implementation.builtin
BuiltInBeansTest
testPrincipalBean()
org.jboss.jsr299.tck.tests.interceptors.definition
InterceptorDefinitionTest
testInterceptionType()
org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.interceptor
InterceptorNotResolvedTest
testInterceptorNotResolved()
org.jboss.jsr299.tck.tests.lookup.typesafe.resolution
ResolutionByTypeTest
testPolicyNotAvailableInNonDeploymentArchive()
jboss-as-broken (0)
ri-broken (0)