[webbeans-commits] Webbeans SVN: r3395 - in tck/trunk/impl/src/main: resources and 1 other directory.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Mon Aug 3 09:08:00 EDT 2009


Author: shane.bryzak at jboss.com
Date: 2009-08-03 09:07:59 -0400 (Mon, 03 Aug 2009)
New Revision: 3395

Modified:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/FoxRun.java
   tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
more assertion groupings


Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java	2009-08-03 11:19:53 UTC (rev 3394)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java	2009-08-03 13:07:59 UTC (rev 3395)
@@ -28,7 +28,10 @@
    private static final Annotation PET_LITERAL = new AnnotationLiteral<Pet> () {};
    
    @Test(groups = { "contexts", "injection" })
-   @SpecAssertion(section = "6.4", id = "a")
+   @SpecAssertions({
+      @SpecAssertion(section = "6.4", id = "a"),
+      @SpecAssertion(section = "6.4.1", id = "ga")
+   })
    public void testInstanceNotSharedBetweenInjectionPoints()
    {
       Set<Bean<Fox>> foxBeans = getBeans(Fox.class);

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/FoxRun.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/FoxRun.java	2009-08-03 11:19:53 UTC (rev 3394)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/FoxRun.java	2009-08-03 13:07:59 UTC (rev 3395)
@@ -6,10 +6,9 @@
 
 @Named("foxRun")
 class FoxRun
-{
-   
+{   
    private static boolean destroyed = false;
-   
+
    @Current
    public Fox fox;
    

Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml	2009-08-03 11:19:53 UTC (rev 3394)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml	2009-08-03 13:07:59 UTC (rev 3395)
@@ -1703,22 +1703,26 @@
     </assertion>
   </section>
 
-  <section id="4.3.2" title="Most specialized enabled bean for a bean">
-    <assertion id="a">
-      <text>Non-static producer methods, ~producer fields, disposal methods and observer methods~ of a bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 5.6.6, "Invocation of producer or disposal methods", Section 5.6.7, "Access to producer field values" and Section 5.6.8, "Invocation of observer methods".</text>
-    </assertion>
+  <section id="4.3.2" title="Most specialized enabled bean for a bean">
+    <group>
+      <text>Non-static producer methods, producer fields, disposal methods and observer methods of a bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 5.6.6, "Invocation of producer or disposal methods", Section 5.6.7, "Access to producer field values" and Section 5.6.8, "Invocation of observer methods".</text>
+            
+      <assertion id="a">
+        <text>Test with non-static producer method.</text>
+      </assertion>
+        
+      <assertion id="b">
+        <text>Test with non-static producer field.</text>
+      </assertion>       
       
-    <assertion id="b">
-      <text>Non-static ~producer methods,~ producer fields~, disposal methods and observer methods~ of a bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 5.6.6, "Invocation of producer or disposal methods", Section 5.6.7, "Access to producer field values" and Section 5.6.8, "Invocation of observer methods".</text>
-    </assertion>       
-    
-    <assertion id="c">
-      <text>Non-static ~producer methods, producer fields,~ disposal methods~ and observer methods~ of a bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 5.6.6, "Invocation of producer or disposal methods", Section 5.6.7, "Access to producer field values" and Section 5.6.8, "Invocation of observer methods".</text>
-    </assertion>
-    
-    <assertion id="d">
-      <text>Non-static ~producer methods, producer fields, disposal methods and~ observer methods of a bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 5.6.6, "Invocation of producer or disposal methods", Section 5.6.7, "Access to producer field values" and Section 5.6.8, "Invocation of observer methods".</text>
-    </assertion>
+      <assertion id="c">
+        <text>Test with non-static disposal method.</text>
+      </assertion>
+      
+      <assertion id="d">
+        <text>Test with non-static observer method.</text>
+      </assertion>
+    </group>
 
   </section>
 
@@ -1740,18 +1744,22 @@
     </assertion>
   </section>
 
-  <section id="5.1" title="Inter-module accessibility in Java EE">
-    <assertion id="aa">
-      <text>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.</text>
-    </assertion>
-    
-    <assertion id="ab">
-      <text>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.</text>
-    </assertion>
-    
-    <assertion id="ac">
-      <text>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.</text>
-    </assertion>
+  <section id="5.1" title="Inter-module accessibility in Java EE">
+    <group>
+      <text>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.</text>
+            
+      <assertion id="aa">
+        <text>Test with injection.</text>
+      </assertion>
+      
+      <assertion id="ab">
+        <text>Test with lookup.</text>
+      </assertion>
+      
+      <assertion id="ac">
+        <text>Test with EL resolution.</text>
+      </assertion>
+    </group>
 
     <assertion id="b">
       <text>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.</text>
@@ -1772,10 +1780,6 @@
       <text>A policy 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).</text>
     </assertion>
     
-    <assertion id="a">
-      <text>A policy 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).</text>
-    </assertion>
-
     <assertion id="b">
       <text>Nor is a policy available for injection, lookup or EL resolution in every bean deployment archive. A policy must be explicitly enabled in every bean deployment archive in which the policy should be available for injection, lookup and EL resolution.</text>
     </assertion>
@@ -1787,26 +1791,30 @@
     <assertion id="d" testable="false">
       <text>The &lt;policies&gt; element contains a list of bean classes and stereotypes. </text>
     </assertion>
+
+    <group>
+      <text>A policy is enabled for the bean deployment archive if the policy is a managed bean or session bean and the bean class of the bean is listed.</text>
+            
+      <assertion id="ea">
+        <text>Test with a managed bean.</text>
+      </assertion>
+      
+      <assertion id="eb">
+        <text>Test with a session bean.</text>
+      </assertion>
+    </group>
 
-    <assertion id="ea">
-      <text>A policy is enabled for the bean deployment archive if the policy is a _managed bean_ or ~session bean~ and the bean class of the bean is listed.</text>
-    </assertion>
-    
-    <assertion id="eb">
-      <text>A policy is enabled for the bean deployment archive if the policy is a ~managed bean~ or _session bean_ and the bean class of the bean is listed.</text>
-    </assertion>
-
-	<group>
-	   <text>A policy is enabled 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.</text>
+    <group>
+	    <text>A policy is enabled 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.</text>
 	   
 	   <assertion id="fa">
-          <text>Test for enablement of a producer method and field.</text>
-       </assertion>
+       <text>Test for enablement of a producer method and field.</text>
+     </assertion>
        
 	   <assertion id="fb">
-          <text>Test for enablement of a resource.</text>
-       </assertion>
-	</group>
+       <text>Test for enablement of a resource.</text>
+     </assertion>
+  	</group>
 
     <assertion id="g">
       <text>A policy is enabled for the bean deployment archive if any |@Policy| stereotype of the policy is listed.</text>
@@ -1845,50 +1853,62 @@
     <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>
-    </assertion>
+    
+    <group>
+      <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="i">
+        <text>Test with a primitive type.</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>
-    </assertion>
+      <assertion id="j">
+        <text>Test with an array type.</text>
+      </assertion>
 
-    <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="ka">
+        <text>Test with a parameterized type.</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="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 |@javax.enterprise.inject.NonBinding| (see Section 5.3.5, "Binding annotations with members").</text>
-    </assertion>
+      <assertion id="kb">
+        <text>Test with a raw type.</text>
+      </assertion>
+    </group>
+
+    <group>
+      <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 id="la">
+        <text>Test with beans with required bindings.</text>
+      </assertion>
+      
+      <assertion id="lb">
+        <text>Test with beans without required bindings.</text>
+      </assertion>
+      
+      <assertion id="lc">
+        <text>Test with matching beans with matching binding with same type.</text>
+      </assertion>
+      
+      <assertion id="ld">
+        <text>Test with matching beans with matching binding with same annotation member value for each member which is not annotated |@javax.enterprise.inject.NonBinding|.</text>
+      </assertion>
+    </group>
     
-    <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 |@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 |@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 |@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="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>
+
+    <group>
+      <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>Test |getTypes()| determines bean types.</text>
+      </assertion>
+      
+      <assertion id="nb">
+        <text>Test |getBindings()| determines bindings.</text>
+      </assertion>
+    </group>
   </section>
 
   <section id="5.3.1" title="Unsatisfied and ambiguous dependencies">
@@ -1942,13 +1962,18 @@
     </assertion>
   </section>
 
-  <section id="5.3.4" title="Primitive types and null values">
-    <assertion id="aa">
-      <text>If necessary, the container performs boxing ~or unboxing~ when it injects a value to a field or parameter of primitive or wrapper type.</text>
-    </assertion>
-    <assertion id="ab">
-      <text>If necessary, the container performs ~boxing or~ unboxing when it injects a value to a field or parameter of primitive or wrapper type.</text>
-    </assertion>
+  <section id="5.3.4" title="Primitive types and null values">
+    <group>
+      <text>If necessary, the container performs boxing or unboxing when it injects a value to a field or parameter of primitive or wrapper type.</text>
+            
+      <assertion id="aa">
+        <text>Test boxing.</text>
+      </assertion>
+      
+      <assertion id="ab">
+        <text>Test unboxing.</text>
+      </assertion>
+    </group>
 
     <assertion id="aa">
       <text>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, as defined in Section 12.4 "Problems detected automatically by the container".</text>
@@ -2576,14 +2601,33 @@
     </assertion>
   </section>
 
-  <section id="6.4.1" title="Dependent objects">
-    <assertion id="a">
+  <section id="6.4.1" title="Dependent objects">
+    <group>
       <text>Instances of interceptors or decorators with scope |@Dependent| are dependent objects of the bean instance they decorate.</text>
-    </assertion>
-
-    <assertion id="g">
-      <text>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.</text>
-    </assertion>
+      <assertion id="aa">
+        <text>Test with a |@Dependent|-scoped interceptor.</text>
+      </assertion>
+      
+      <assertion id="ab">
+        <text>Test with a |@Dependent|-scoped decorator.</text>
+      </assertion>
+    </group>
+
+    <group>
+      <text>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.</text>
+            
+      <assertion id="ga">
+        <text>Test with |@Dependent|-scoped bean injected into field.</text>
+      </assertion>
+      
+      <assertion id="gb">
+        <text>Test with |@Dependent|-scoped bean injected into bean constructor.</text>
+      </assertion>
+      
+      <assertion id="gc">
+        <text>Test with |@Dependent|-scoped bean injected into initializer method.</text>
+      </assertion>      
+    </group>
     
     <assertion id="h">
       <text>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.</text>




More information about the weld-commits mailing list