[webbeans-commits] Webbeans SVN: r3349 - in tck/trunk/impl/src/main: resources and 1 other directory.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Wed Jul 29 09:30:48 EDT 2009
Author: jharting
Date: 2009-07-29 09:30:48 -0400 (Wed, 29 Jul 2009)
New Revision: 3349
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/Sole.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Minor
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-29 12:31:43 UTC (rev 3348)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java 2009-07-29 13:30:48 UTC (rev 3349)
@@ -119,6 +119,7 @@
}
assert classes.contains(Cod.class);
assert classes.contains(Sole.class);
+
}
@Test(groups = { "resolution" })
@@ -162,7 +163,7 @@
@Test(groups = "resolution")
@SpecAssertions( {
- @SpecAssertion(section = "5.3", id = "le"),
+ @SpecAssertion(section = "5.3", id = "ld"),
@SpecAssertion(section = "5.3.5", id = "b")
})
public void testResolveByTypeWithNonBindingMembers() throws Exception
@@ -183,20 +184,14 @@
}, new AnnotationLiteral<Whitefish>(){});
assert beans.size() == 2;
- List<Class<? extends Animal>> classes = new ArrayList<Class<? extends Animal>>();
+ Set<Type> classes = new HashSet<Type>();
for (Bean<Animal> bean : beans)
{
- if (bean.getTypes().contains(Halibut.class))
- {
- classes.add(Halibut.class);
- }
- else if (bean.getTypes().contains(RoundWhitefish.class))
- {
- classes.add(RoundWhitefish.class);
- }
+ classes.addAll(bean.getTypes());
}
assert classes.contains(Halibut.class);
assert classes.contains(RoundWhitefish.class);
+ assert !classes.contains(Sole.class);
}
@Test(groups = { "ri-broken", "policy" })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Sole.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Sole.java 2009-07-29 12:31:43 UTC (rev 3348)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Sole.java 2009-07-29 13:30:48 UTC (rev 3349)
@@ -3,6 +3,7 @@
import javax.enterprise.inject.Named;
@Whitefish
+ at Expensive(veryExpensive = false, cost = 100)
@Named("whitefish")
class Sole implements ScottishFish
{
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-29 12:31:43 UTC (rev 3348)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-29 13:30:48 UTC (rev 3349)
@@ -1869,13 +1869,9 @@
</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 |@javax.enterprise.inject.NonBinding| (see Section 5.3.5, "Binding annotations with members").</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 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 |@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 |@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>
@@ -2299,9 +2295,13 @@
<text>The |get()| method must identify a bean that matches the required type and required bindings and is accessible to the class into which the parent |Instance| was injected, according to the rules of typesafe resolution, as defined in Section 5.3, "Typesafe resolution" and resolving ambiguities according to Section 5.3.1, "Unsatisfied and ambiguous dependencies".</text>
</assertion>
- <assertion id="fb">
- <text>If typesafe resolution results in an unsatisfied dependency, throw an |UnsatisfiedResolutionException|. If typesafe resolution results in an unresolvable ambiguous dependency, throw an |AmbiguousResolutionException|.</text>
+ <assertion id="fba">
+ <text>If typesafe resolution results in an unsatisfied dependency, throw an |UnsatisfiedResolutionException|.</text>
</assertion>
+
+ <assertion id="fbb">
+ <text>If typesafe resolution results in an unresolvable ambiguous dependency, throw an |AmbiguousResolutionException|.</text>
+ </assertion>
<assertion id="fc">
<text>Otherwise, obtain a contextual reference for the bean and the required type, as defined in Section 6.5.3, "Contextual reference for a bean".</text>
More information about the weld-commits
mailing list