Author: pete.muir(a)jboss.org
Date: 2009-07-22 12:23:19 -0400 (Wed, 22 Jul 2009)
New Revision: 3138
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
make resolution assertions more granular
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java 2009-07-22
16:09:39 UTC (rev 3137)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java 2009-07-22
16:23:19 UTC (rev 3138)
@@ -316,7 +316,7 @@
}
@Test(groups = { "ri-broken", "resolution" })
- @SpecAssertion(section = "5.3", id = "h")
+ @SpecAssertion(section = "5.3", id = "hb")
public void testDecoratorNotResolved() {
Cat cat = getInstanceByType(Cat.class);
assert cat != null;
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java 2009-07-22
16:09:39 UTC (rev 3137)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java 2009-07-22
16:23:19 UTC (rev 3138)
@@ -43,7 +43,7 @@
{
@Test(groups = "resolution")
- @SpecAssertion(section = "5.3", id = "l")
+ @SpecAssertion(section = "5.3", id = "lb")
public void testDefaultBindingTypeAssumed() throws Exception
{
Set<Bean<Tuna>> possibleTargets = getBeans(Tuna.class);
@@ -52,7 +52,7 @@
}
@Test(groups = "resolution")
- @SpecAssertion(section = "unknown", id = "unknown")
+ @SpecAssertion(section = "5.3", id = "hc")
public void testResolveByType() throws Exception
{
@@ -88,7 +88,7 @@
@Test(groups = "injection")
@SpecAssertions( {
@SpecAssertion(section = "2.3.4", id = "b"),
- @SpecAssertion(section = "5.3", id = "l"),
+ @SpecAssertion(section = "5.3", id = "lc"),
@SpecAssertion(section = "2.3.3", id = "d"),
@SpecAssertion(section = "5.3.6", id = "a"),
@SpecAssertion(section = "5.3.6", id = "d") })
@@ -124,9 +124,8 @@
@Test(groups = { "resolution" })
@SpecAssertions( {
- @SpecAssertion(section = "5.3", id = "k"),
- @SpecAssertion(section = "2.2", id = "review"),
- @SpecAssertion(section = "2.2", id = "review") })
+ @SpecAssertion(section = "5.3", id = "ka")
+ })
public void testResolveByTypeWithTypeParameter() throws Exception
{
assert getBeans(new TypeLiteral<Farmer<ScottishFish>>(){}).size() ==
1;
@@ -163,7 +162,7 @@
}
@Test(groups = "resolution")
@SpecAssertions( {
- @SpecAssertion(section = "5.3", id = "l"),
+ @SpecAssertion(section = "5.3", id = "le"),
@SpecAssertion(section = "5.3.5", id = "b")
})
public void testResolveByTypeWithNonBindingMembers() throws Exception
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-22 16:09:39 UTC (rev 3137)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-22 16:23:19 UTC (rev 3138)
@@ -1709,33 +1709,65 @@
</section>
<section id="5.3" title="Typesafe resolution">
- <assertion id="h">
- <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and which have a bean type that matches the required type.</text>
+ <assertion id="hq">
+ <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not _interceptors_ or
decorators and which have a bean type that matches the required type.</text>
</assertion>
+ <assertion id="hb">
+ <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
_decorators_ and which have a bean type that matches the required type.</text>
+ </assertion>
+
+ <assertion id="hc">
+ <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and which have a _bean type that matches the required type_.</text>
+ </assertion>
+
<assertion id="i">
- <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and which have 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.3.3, "Assignability
of raw and parameterized types".~</text>
+ <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and which have 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.3.3, "Assignability
of raw and parameterized types".~</text>
</assertion>
<assertion id="j">
- <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and which have 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.3.3, "Assignability
of raw and parameterized types".~</text>
+ <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and which have 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.3.3, "Assignability
of raw and parameterized types".~</text>
</assertion>
- <assertion id="k">
- <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and which have 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.3.3, "Assignability
of raw and parameterized types".</text>
+ <assertion id="ka">
+ <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and which have 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.3.3, "Assignability
of raw and parameterized types".</text>
</assertion>
+
+ <assertion id="kb">
+ <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and which have 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.3.3, "Assignability
of raw and parameterized types".</text>
+ </assertion>
- <assertion id="l">
- <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and which have the required bindings. If no required bindings were explicitly
specified, the container assumes the required binding |@Current|. The container narrows
the set of matching beans to just those where for each required binding, the bean declares
a matching binding with (a) the same type and (b) the same annotation member value for
each member which is not annotated |(a)javax.enterprise.inject.NonBinding| (see Section
5.3.5, "Binding annotations with members").</text>
+ <assertion id="la">
+ <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and _which have the required bindings_. If no required bindings were explicitly
specified, the container assumes the required binding |@Current|. The container narrows
the set of matching beans to just those where for each required binding, the bean declares
a matching binding with (a) the same type and (b) the same annotation member value for
each member which is not annotated |(a)javax.enterprise.inject.NonBinding| (see Section
5.3.5, "Binding annotations with members").</text>
</assertion>
+
+ <assertion id="lb">
+ <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and which have the required bindings. _If no required bindings were explicitly
specified, the container assumes the required binding |@Current|_. The container narrows
the set of matching beans to just those where for each required binding, the bean declares
a matching binding with (a) the same type and (b) the same annotation member value for
each member which is not annotated |(a)javax.enterprise.inject.NonBinding| (see Section
5.3.5, "Binding annotations with members").</text>
+ </assertion>
+
+ <assertion id="lc">
+ <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and which have the required bindings. If no required bindings were explicitly
specified, the container assumes the required binding |@Current|. The container narrows
the set of matching beans to just those where for each required binding, the bean declares
a matching binding with (a) _the same type_ and (b) the same annotation member value for
each member which is not annotated |(a)javax.enterprise.inject.NonBinding| (see Section
5.3.5, "Binding annotations with members").</text>
+ </assertion>
+
+ <assertion id="ld">
+ <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and which have the required bindings. If no required bindings were explicitly
specified, the container assumes the required binding |@Current|. The container narrows
the set of matching beans to just those where for each required binding, the bean declares
a matching binding with (a) the same type and (b) _the same annotation member value_ for
each member which is not annotated |(a)javax.enterprise.inject.NonBinding| (see Section
5.3.5, "Binding annotations with members").</text>
+ </assertion>
+
+ <assertion id="le">
+ <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and which have the required bindings. If no required bindings were explicitly
specified, the container assumes the required binding |@Current|. The container narrows
the set of matching beans to just those where for each required binding, the bean declares
a matching binding with (a) the same type and (b) the same annotation member value for
each member _which is not annotated |(a)javax.enterprise.inject.NonBinding|_ (see Section
5.3.5, "Binding annotations with members").</text>
+ </assertion>
<assertion id="m">
<text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators. In a Java EE or servlet container, the bean class is required to be
accessible to the class that declares the injection point, according to the class loading
requirements of the Java EE platform and Java Servlet specifications.</text>
</assertion>
- <assertion id="n">
- <text>When resolving beans that are eligible for injection to an injection point,
the container identifies the set of matching beans which are not interceptors or
decorators and which are not a policy, or is an enabled policy of the bean deployment
archive of the class that declares the injection point. For a custom implementation of the
|Bean| interface defined in Section 11.1, "The Bean interface", the container
calls |getTypes()| and |getBindings()| to determine the bean types and
bindings.</text>
+ <assertion id="na">
+ <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and which are not a policy, or is an enabled policy of the bean deployment
archive of the class that declares the injection point. For a custom implementation of the
|Bean| interface defined in Section 11.1, "The Bean interface", the container
calls _|getTypes()|_ and |getBindings()| to determine the bean types and
bindings.</text>
</assertion>
+
+ <assertion id="nb">
+ <text>When resolving beans that are eligible for injection to an injection
point, the container identifies the set of matching beans which are not interceptors or
decorators and which are not a policy, or is an enabled policy of the bean deployment
archive of the class that declares the injection point. For a custom implementation of the
|Bean| interface defined in Section 11.1, "The Bean interface", the container
calls |getTypes()| and _|getBindings()|_ to determine the bean types and
bindings.</text>
+ </assertion>
</section>
<section id="5.3.1" title="Unsatisfied and ambiguous
dependencies">