Author: shane.bryzak(a)jboss.com
Date: 2009-02-20 02:47:34 -0500 (Fri, 20 Feb 2009)
New Revision: 1612
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
chapter 5 assertions
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-20 02:29:34 UTC (rev 1611)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-20 07:47:34 UTC (rev 1612)
@@ -2631,12 +2631,300 @@
<section id="5.8" title="Dynamic lookup">
- </section>
+ <assertion id="a">
+ <text>An instance of the javax.inject.Instance interface may be injected via
use of the
+(a)javax.inject.Obtains binding</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Additional bindings may be specified at the injection
point</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The Instance interface provides a method for obtaining instances of
beans of a specific type</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If two instances of the same binding type are passed to Instance.get(),
a DuplicateBindingTypeException is thrown</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If an instance of an annotation that is not a binding type is passed to
Instance.get(), an IllegalArgumentException is thrown</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>The @Obtains annotation or <Obtains> element may be
applied to any injection point of type Instance where an actual type parameter is
specified</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>If the type of the injection point is not of type Instance a
DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>If no actual type parameter is specified a DefinitionException is
thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>If the type parameter contains a type variable a DefinitionException is
thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="j">
+ <text>If the type parameter contains a wildcard a DefinitionException is
thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="k">
+ <text>Whenever the @Obtains annotation appears at an injection point, an
implicit bean exists with exactly the bean type and bindings that appear at the injection
point</text>
+ </assertion>
+
+ <assertion id="l">
+ <text>Whenever the @Obtains annotation appears at an injection point, an
implicit bean exists with deployment type @Standard</text>
+ </assertion>
+
+ <assertion id="m">
+ <text>Whenever the @Obtains annotation appears at an injection point, an
implicit bean exists with @Dependent scope</text>
+ </assertion>
+
+ <assertion id="n">
+ <text>Whenever the @Obtains annotation appears at an injection point, an
implicit bean exists with no bean name</text>
+ </assertion>
+
+ <assertion id="o">
+ <text>Whenever the @Obtains annotation appears at an injection point, an
implicit bean exists with an implementation provided automatically by the
container</text>
+ </assertion>
+
+ <assertion id="p">
+ <text>The get() method of the provided implementation of Instance must call
Manager.getInstanceByType(), passing all bindings declared at the injection point, except
@Obtains, and all bindings passed to Instance.get()</text>
+ </assertion>
+
+ <assertion id="q">
+ <text>The application may obtain a contextual instance by calling the
Instance.get() method</text>
+ </assertion>
+
+ <assertion id="r">
+ <text>When the application calls Instance.get() to obtain a contextual
instance dynamically, it may need to pass instances of binding annotation
types</text>
+ </assertion>
+ </section>
<section id="5.9" title="Typesafe resolution algorithm">
+ <assertion id="a">
+ <text>The resolveByType() method of the Manager interface returns the result
of the typesafe resolution</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If no bindings are passed to Manager.resolveByType(), the default
binding @Current is assumed</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If a parameterized type with a type parameter or wildcard is passed to
Manager.resolveByType(), an IllegalArgumentException is thrown</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If two instances of the same binding type are passed to
Manager.resolveByType(), a DuplicateBindingTypeException is thrown</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If an instance of an annotation that is not a binding type is passed to
Manager.resolveByType(), an IllegalArgumentException is thrown</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>When the container is resolving a bean by type, it identifies the set
of matching enabled beans which have the given bean type. For this purpose, primitive
types are considered to be identical to their corresponding wrapper types in java.lang,
array types are considered identical only if their element types are identical and
parameterized types are considered identical only if both the type and all type parameters
are identical</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>When the container is resolving a bean by type, it considers the given
bindings. If no bindings were passed to resolveByType(), the container assumes the binding
@Current. The container narrows the set of matching beans to just those where for each
given binding, the bean declares a binding with (a) the same type and (b) the same
annotation member value for each member which is not annotated @NonBinding (see Section
5.9.1, "Binding annotations with members")</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>When the container is resolving a bean by type, it examines the
deployment types of the matching beans, as defined in Section 2.5.7, "Deployment type
precedence", and returns the set of beans with the highest precedence deployment type
that occurs in the set. If there are no matching beans, an empty set is
returned</text>
+ </assertion>
+ </section>
+ <section id="5.9.1" title="Binding annotations with
members">
+ <assertion id="a">
+ <text>Binding types with members are supported</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>An annotation member may be excluded from consideration using the
@NonBinding annotation</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>Array-valued or annotation-valued members of a binding type must be
annotated @NonBinding. If an array-valued or annotation-valued member of a binding type is
not annotated @NonBinding, a DefinitionException is thrown by the container at deployment
time</text>
+ </assertion>
</section>
+ <section id="5.9.2" title="Multiple bindings">
+ <assertion id="a">
+ <text>A bean class may declare multiple bindings</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A producer method may declare multiple bindings</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>A producer field may declare multiple bindings</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>A bean must declare all of the bindings that are specified at the
injection point to be considered a candidate for injection</text>
+ </assertion>
+ </section>
+
+ <section id="5.10" title="EL name resolution">
+ <assertion id="a" testable="false">
+ <text>The container must provide a Unified EL ELResolver to the servlet
engine and JSF implementation that resolves bean names</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>When this resolver is called with a null base object, it calls the
method Manager.getInstanceByName() to obtain an instance of the bean named in the EL
expression</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The Manager.getInstanceByName() method must identify the bean by
calling Manager.resolveByName(), passing the name</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>The Manager.getInstanceByName() method must return a null value, if
Manager.resolveByName() returned an empty set</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>The Manager.getInstanceByName() method must throw an
AmbiguousDependencyException if Manager.resolveByName() returned more than one
bean</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>The Manager.getInstanceByName() method must obtain an instance of the
bean by calling Manager.getInstance(), passing the Bean instance representing the bean if
exactly one bean was returned by Manager.resolveByName()</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>For each distinct name that appears in the EL expression,
getInstanceByName() must be called at most once</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>Even if a
+name appears more than once in the same expression, the container may not call
getInstanceByName() multiple times with that name. This restriction ensures that there is
a unique instance of each bean with scope @Dependent in any EL evaluation</text>
+ </assertion>
+ </section>
+
+ <section id="5.11" title="Name resolution algorithm">
+ <assertion id="a">
+ <text>The resolveByName() method of the Manager interface performs name
resolution</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>When resolving a bean by name, the container must identify the set of
matching enabled beans which have the given name</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>After the container identifies the set of matching beans, it examines
the deployment types of the matching beans, as defined in Section 2.5.7, "Deployment
type precedence", and returns the set of beans with the highest precedence deployment
type that occurs in the set</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If there are no matching beans, an empty set is returned</text>
+ </assertion>
+ </section>
+
+ <section id="5.12" title="Injection into non-contextual
objects">
+ <assertion id="a">
+ <text>The container is required to perform dependency injection upon certain
non-contextual objects</text>
+ </assertion>
+ </section>
+
+ <section id="5.12.1" title="Non-contextual instances of session
beans">
+ <assertion id="a">
+ <text>The container is required to perform dependency injection for session
bean instances obtained directly from JNDI</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The container is required to perform dependency injection for session
bean instances injected using @EJB</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The container is required to perform dependency injection for session
bean instances injected using @Resource</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>The container is required to perform dependency injection for session
bean instances created by the container to receive remote method calls</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>The container is required to perform dependency injection for session
bean instances created by the container to receive timeouts</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>The container is required to create interceptor stacks for session bean
instances obtained directly from JNDI</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>The container is required to create interceptor stacks for session bean
instances injected using @EJB</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>The container is required to create interceptor stacks for session bean
instances injected using @Resource</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>The container is required to create interceptor stacks for session bean
instances created by the container to receive remote method calls</text>
+ </assertion>
+
+ <assertion id="j">
+ <text>The container is required to create interceptor stacks for session bean
instances created by the container to receive timeouts</text>
+ </assertion>
+
+ <assertion id="k">
+ <text>The container is required to create decorator stacks for session bean
instances obtained directly from JNDI</text>
+ </assertion>
+
+ <assertion id="l">
+ <text>The container is required to create decorator stacks for session bean
instances injected using @EJB</text>
+ </assertion>
+
+ <assertion id="m">
+ <text>The container is required to create decorator stacks for session bean
instances injected using @Resource</text>
+ </assertion>
+
+ <assertion id="n">
+ <text>The container is required to create decorator stacks for session bean
instances created by the container to receive remote method calls</text>
+ </assertion>
+
+ <assertion id="o">
+ <text>The container is required to create decorator stacks for session bean
instances created by the container to receive timeouts</text>
+ </assertion>
+
+ <assertion id="p">
+ <text>For the purposes of dependency injection, the container must treat
non-contextual instances of session beans as instances of the most specialized bean that
specializes the bean with binding @New and deployment type @Standard defined in Section
3.3.6, "Session beans with the @New binding"</text>
+ </assertion>
+
+ <assertion id="q">
+ <text>For the purposes of interceptor stack creation, the container must
treat non-contextual instances of session beans as instances of the most specialized bean
that specializes the bean with binding @New and deployment type @Standard defined in
Section 3.3.6, "Session beans with the @New binding"</text>
+ </assertion>
+
+ <assertion id="r">
+ <text>For the purposes of decorator stack creation, the container must treat
non-contextual instances of session beans as instances of the most specialized bean that
specializes the bean with binding @New and deployment type @Standard defined in Section
3.3.6, "Session beans with the @New binding"</text>
+ </assertion>
+
+ </section>
+
+ <section id="5.12.2" title="Message-driven beans">
+ <assertion id="a">
+ <text>The container performs dependency injection for message-driven bean
instances according to the bean class annotations</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The container creates interceptor stacks for message-driven bean
instances according to the bean class annotations</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The container creates decorator stacks for message-driven bean
instances according to the bean class annotations</text>
+ </assertion>
+ </section>
+
+ <section id="5.12.3" title="Servlets">
+ <assertion id="a">
+ <text>The container performs dependency injection for servlets according to
the servlet class annotations</text>
+ </assertion>
+ </section>
+
<section id="6" title="Bean lifecycle">
</section>