[webbeans-commits] Webbeans SVN: r3709 - tck/trunk/impl/src/main/resources.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Sun Sep 20 22:09:51 EDT 2009


Author: shane.bryzak at jboss.com
Date: 2009-09-20 22:09:51 -0400 (Sun, 20 Sep 2009)
New Revision: 3709

Modified:
   tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
   tck/trunk/impl/src/main/resources/tck-audit-mb.xml
Log:
section 2 and 3 assertions for PFD2


Modified: tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit-cdi.xml	2009-09-19 16:08:53 UTC (rev 3708)
+++ tck/trunk/impl/src/main/resources/tck-audit-cdi.xml	2009-09-21 02:09:51 UTC (rev 3709)
@@ -4,7 +4,7 @@
     xsi:schemaLocation="http://jboss.com/products/webbeans/tck/audit /Users/pmuir/workspace/jboss-test-audit/api/src/main/resources/tck-audit.xsd"
     name="JSR-299: Contexts and Dependency Injection for Java Enterprise Edition"
     id="cdi"
-    version="1.0.20090625">
+    version="PFD2">
 
   <section id="2" title="Concepts">
 
@@ -13,7 +13,7 @@
     </assertion>
 
     <assertion id="b">
-      <text>A bean comprises of a (nonempty) set of bindings.</text>
+      <text>A bean comprises of a (nonempty) set of qualifiers.</text>
     </assertion>
 
     <assertion id="c">
@@ -31,6 +31,9 @@
     <assertion id="g">
       <text>A bean comprises of a bean implementation.</text>
     </assertion>
+  </section>
+  
+  <section id="2.1" title="Functionality provided by the container to the bean">
   </section>
 
   <section id="2.2" title="Bean types">
@@ -101,93 +104,101 @@
     </assertion>
   </section>
 
-  <section id="2.3" title="Bindings">
+  <section id="2.3" title="Qualifiers">
 
   </section>
 
-  <section id="2.3.1" title="Built-in binding types">
+  <section id="2.3.1" title="Built-in qualifier types">
 
     <assertion id="a0">
       <text>Every bean has the built-in binding |@Any|, even if it does not explicitly declare this binding, except for beans with the built-in binding |@New| defined in Section 3.11, "Beans with the @New binding".</text>
     </assertion>
 
     <assertion id="aa">
-      <text>If a bean does not explicitly declare a binding, the bean has exactly one additional binding, of type |@Current|.</text>
+      <text>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.</text>
     </assertion>
 
     <assertion id="b">
-      <text>The default binding is also assumed for any injection point that does not explicitly declare a binding.</text>
+      <text>The default qualifier is also assumed for any injection point that does not explicitly declare a qualifier.</text>
     </assertion>
   </section>
 
-  <section id="2.3.2" title="Defining new binding types">
+  <section id="2.3.2" title="Defining new qualifier types">
     <assertion id="aa" testable="false">
-      <text>A binding type is a Java annotation defined as |@Target({METHOD, FIELD, PARAMETER, TYPE})|~ and |@Retention(RUNTIME)|~.</text>
+      <text>A qualifier type is a Java annotation defined as |@Target({METHOD, FIELD, PARAMETER, TYPE})|~ and |@Retention(RUNTIME)|~.</text>
     </assertion>
 
     <assertion id="ab" testable="false">
-      <text>A binding type is a Java annotation defined as ~|@Target({METHOD, FIELD, PARAMETER, TYPE})| and ~|@Retention(RUNTIME)|.</text>
+      <text>A qualifier type is a Java annotation defined as ~|@Target({METHOD, FIELD, PARAMETER, TYPE})| and ~|@Retention(RUNTIME)|.</text>
       <note>Non-runtime retention annotations are discarded by the compiler</note>
     </assertion>
 
     <assertion id="ba">
-      <text>A binding type may be declared by specifying the |@javax.enterprise.inject.BindingType| meta-annotation.</text>
+      <text>A binding type may be declared by specifying the |@javax.inject.Qualifier| meta-annotation.</text>
     </assertion>
 
     <assertion id="d" testable="false">
-      <text>A binding type may define annotation members.</text>
+      <text>A qualifier type may define annotation members.</text>
       <note>This is true by default in the JLS</note>
     </assertion>
   </section>
 
-  <section id="2.3.3" title="Declaring the bindings of a bean">
-    <assertion id="a">
-      <text>A bean's bindings are declared by annotating the bean class with the binding types.</text>
-    </assertion>
+  <section id="2.3.3" title="Declaring the qualifiers of a bean">
+    <group>
+      <text>A bean's qualifiers are declared by annotating the bean class or producer method or field with the qualifier types.</text>
+    
+      <assertion id="a">
+        <text>Test by annotating a bean class.</text>
+      </assertion>
 
-    <assertion id="b">
-      <text>A bean's bindings are declared by annotating the producer method with the binding types.</text>
-    </assertion>
+      <assertion id="b">
+        <text>Test by annotating a producer method.</text>
+      </assertion>
 
-    <assertion id="c">
-      <text>A bean's bindings are declared by annotating the producer field with the binding types.</text>
-    </assertion>
+      <assertion id="c">
+        <text>Test by annotating a producer field.</text>
+      </assertion>
+    </group>
 
     <assertion id="d">
-      <text>Any bean may declare multiple binding types.</text>
+      <text>Any bean may declare multiple qualifier types.</text>
     </assertion>
   </section>
 
-  <section id="2.3.4" title="Specifying bindings of an injected field">
+  <section id="2.3.4" title="Specifying qualifiers of an injected field">
     <assertion id="a">
-      <text>Binding 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".</text>
+      <text>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".</text>
     </assertion>
 
     <assertion id="b">
-      <text>A bean may only be injected to an injection point if it has all the bindings of the injection point.</text>
+      <text>A bean may only be injected to an injection point if it has all the qualifiers of the injection point.</text>
     </assertion>
   </section>
 
-  <section id="2.3.5" title="Specifying bindings of a method or constructor parameter">
-    <assertion id="a">
-      <text>Binding types may be applied to parameters of producer methods (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container.</text>
-    </assertion>
+  <section id="2.3.5" title="Specifying qualifiers of a method or constructor parameter">
+    <group>
+      <text>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.</text>    
+
+      <assertion id="a">
+        <text>Test producer method.</text>
+      </assertion>
 
-    <assertion id="b">
-      <text>Binding types may be applied to parameters of initializer methods (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container.</text>
-    </assertion>
+      <assertion id="b">
+        <text>Test initializer method.</text>
+      </assertion>
 
-    <assertion id="c">
-      <text>Binding types may be applied to parameters of disposal methods (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container.</text>
-    </assertion>
+      <assertion id="c">
+        <text>Test disposer method.</text>
+      </assertion>
 
-    <assertion id="ca">
-      <text>Binding types may be applied to parameters of observer methods (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container.</text>
-    </assertion>
+      <assertion id="ca">
+        <text>Test observer method.</text>
+      </assertion>
 
-    <assertion id="d">
-      <text>Binding types may be applied to parameters of bean constructors (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container.</text>
-    </assertion>
+      <assertion id="d">
+        <text>Test bean constructor.</text>
+      </assertion>
+    </group>
   </section>
 
   <section id="2.4" title="Scopes">
@@ -238,7 +249,7 @@
     </assertion>
 
     <assertion id="ba">
-      <text>All scope types must specify the |@javax.enterprise.context.ScopeType| meta-annotation.</text>
+      <text>All scope types must specify the |@javax.inject.Scope| or |@javax.enterprise.context.NormalScope| meta-annotation.</text>
     </assertion>
 
   </section>
@@ -288,38 +299,46 @@
   </section>
 
   <section id="2.5.1" title="Declaring the bean EL name">
+
+    <group>
+      <text>To specify the EL name of a bean, the |@javax.inject.Named| annotation is applied to the bean class or producer method or field.</text>
+      
+      <assertion id="a">
+        <text>Test with a bean class.</text>
+      </assertion>
 
-    <assertion id="a">
-      <text>To specify the EL name of a bean, the |@javax.enterprise.inject.Named| annotation is applied to the bean class.</text>
-    </assertion>
+      <assertion id="b">
+        <text>Test with a producer method.</text>
+      </assertion>
 
-    <assertion id="b">
-      <text>To specify the EL name of a bean, the |@javax.enterprise.inject.Named| annotation is applied to the producer method.</text>
-    </assertion>
+      <assertion id="c">
+        <text>Test with a producer field.</text>
+      </assertion>
+    </group>
 
-    <assertion id="c">
-      <text>To specify the EL name of a bean, the |@javax.enterprise.inject.Named| annotation is applied to the producer field.</text>
-    </assertion>
-
     <assertion id="d">
-    <text>If the |@Named| annotation does not specify the value member, the default EL name is assumed.</text>
+    <text>If the |@Named| annotation does not specify the |value| member, the default EL name is assumed.</text>
     </assertion>
   </section>
 
   <section id="2.5.2" title="Default bean EL names">
+
+    <group>
+      <text>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.</text>    
+      
+      <assertion id="a">
+        <text>Test with a bean class.</text>
+      </assertion>
 
-    <assertion id="a">
-      <text>A default EL name must be assigned by the container when a bean class declares a |@Named| annotation and no EL name is explicitly specified by the value member.</text>
-    </assertion>
+      <assertion id="b">
+        <text>Test with a producer method.</text>
+      </assertion>
 
-    <assertion id="b">
-      <text>A default EL name must be assigned by the container when a producer method of a bean declares a |@Named| annotation and EL no name is explicitly specified by the value member.</text>
-    </assertion>
+      <assertion id="c">
+        <text>Test with a producer field.</text>
+      </assertion>
+    </group>
 
-    <assertion id="c">
-      <text>A default EL name must be assigned by the container when a producer field of a bean declares a |@Named| annotation and no EL name is explicitly specified by the value member.</text>
-    </assertion>
-
     <assertion id="e">
       <text>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.</text>
     </assertion>
@@ -332,32 +351,32 @@
     </assertion>
   </section>
 
-  <section id="2.6" title="Policies">
+  <section id="2.6" title="Alternatives">
     <assertion id="a">
-      <text>A policy is a bean that must be explicitly declared in the in the beans.xml file if it should be available for lookup, injection or EL resolution.</text>
+      <text>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.</text>
     </assertion>
   </section>
 
-  <section id="2.6.1" title="Declaring a policy">
+  <section id="2.6.1" title="Declaring an alternative">
     <assertion id="a">
-      <text>A policy may be declared by annotating the bean class with the |@Alternative| annotation.</text>
+      <text>An alternative may be declared by annotating the bean class with the |@Alternative| annotation.</text>
     </assertion>
+
+    <group>
+      <text>An alternative may be declared by annotating a bean, producer method or producer field with a stereotype that declares an |@Alternative| annotation.</text>
+            
+      <assertion id="b">
+        <text>Test with a bean.</text>
+      </assertion>
 
-    <assertion id="b">
-      <text>A policy may be declared by annotating a bean with a stereotype that declares a |@Alternative| annotation.</text>
-    </assertion>
+      <assertion id="c">
+        <text>Test with a producer method.</text>
+      </assertion>
 
-    <assertion id="c">
-      <text>A policy may be declared by annotating a producer method with a stereotype that declares a |@Alternative| annotation.</text>
-    </assertion>
-
-    <assertion id="d">
-      <text>A policy may be declared by annotating a producer field with a stereotype that declares a |@Alternative| annotation.</text>
-    </assertion>
-
-    <assertion id="e">
-      <text>If a bean is a policy, all producer methods and fields of the bean are also policies.</text>
-    </assertion>
+      <assertion id="d">
+        <text>Test with a producer field.</text>
+      </assertion>
+    </group>
   </section>
 
   <section id="2.7" title="Stereotypes">
@@ -367,66 +386,73 @@
     </assertion>
 
     <assertion id="aa">
-      <text>A stereotype may specify that all beans with the stereotype are policies.</text>
+      <text>A stereotype may specify that all beans with the stereotype are alternatives.</text>
     </assertion>
+
+    <group>
+      <text>A bean may declare zero, one or multiple stereotypes.</text>
+      
+      <assertion id="b" testable="false">
+        <text>A bean may declare zero stereotypes.</text>
+        <note>Not testable through API</note>
+      </assertion>
 
-    <assertion id="b" testable="false">
-      <text>A bean may declare zero stereotypes.</text>
-      <note>Not testable through API</note>
-    </assertion>
+      <assertion id="c">
+        <text>Test with one stereotype.</text>
+      </assertion>
 
-    <assertion id="c">
-      <text>A bean may declare one stereotype.</text>
-    </assertion>
+      <assertion id="d">
+        <text>Test with multiple stereotypes.</text>
+      </assertion>
+    </group>
 
-    <assertion id="d">
-      <text>A bean may declare multiple stereotypes.</text>
-    </assertion>
-
   </section>
 
-  <section id="2.7.1" title="Defining new stereotypes">
-    <assertion id="aa" testable="false">
-      <text>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)|~.</text>
-    </assertion>
+  <section id="2.7.1" title="Defining new stereotypes">
+    <group>
+      <text>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)|.</text>
+      
+      <assertion id="aa" testable="false">
+        <text>Test |@Target({TYPE, METHOD, FIELD})|.</text>
+      </assertion>
 
-    <assertion id="ab" testable="false">
-      <text>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)|~.</text>
-    </assertion>
+      <assertion id="ab" testable="false">
+        <text>Test |@Target(TYPE)|.</text>
+      </assertion>
 
-    <assertion id="ac" testable="false">
-      <text>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)|~.</text>
-    </assertion>
+      <assertion id="ac" testable="false">
+        <text>Test |@Target(FIELD)|.</text>
+      </assertion>
 
-    <assertion id="ad" testable="false">
-      <text>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)|~.</text>
-    </assertion>
+      <assertion id="ad" testable="false">
+        <text>Test |@Target({METHOD, FIELD})|.</text>
+      </assertion>
 
-    <assertion id="ae" testable="false">
-      <text>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)|.</text>
-      <note>Non-runtime retention annotations are discarded by the compiler</note>
-    </assertion>
+      <assertion id="ae" testable="false">
+        <text>|@Retention(RUNTIME)| - untestable.</text>
+        <note>Non-runtime retention annotations are discarded by the compiler</note>
+      </assertion>
+    </group>
 
     <assertion id="b">
-      <text>A stereotype may be declared by specifying the |@javax.enterprise.inject.stereotype.Stereotype| meta-annotation.</text>
+      <text>A stereotype may be declared by specifying the |@javax.enterprise.inject.Stereotype| meta-annotation.</text>
     </assertion>
-
-    <assertion id="da">
-      <text>A stereotype may not declare any binding annotation. If a stereotype declares a binding annotation, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
-    </assertion>
   </section>
 
   <section id="2.7.1.1" title="Declaring the default scope for a stereotype">
-    <assertion id="aa">
-      <text>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, as defined in Section 12.4, "Problems detected automatically by the
-container".~</text>
-    </assertion>
+
+    <group>
+      <text>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, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+    
+      <assertion id="aa">
+        <text>Test with one scope.</text>
+      </assertion>
+      
+      <assertion id="ab">
+        <text>Test that a stereotype with multiple scopes throws an exception.</text>
+      </assertion>
+    </group>
     
-    <assertion id="ab">
-      <text>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, as defined in Section 12.4, "Problems detected automatically by the
-container"._</text>
-    </assertion>
-    
   </section>
 
   <section id="2.7.1.2" title="Specifying interceptor bindings for a stereotype">
@@ -450,12 +476,17 @@
 
     <assertion id="aab">
       <text>If a stereotype declares a non-empty |@Named| annotation, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+    </assertion>
+    
+    <assertion id="b" testable="false">
+      <text>A stereotype should not declare any qualifier annotation other than |@Named|.  If a stereotype declares any other qualifier annotation, non-portable behavior results.</text>
+      <note>The behavior here is undefined.</note>
     </assertion>
   </section>
 
-  <section id="2.7.1.4" title="Declaring a @Alternative stereotype">
+  <section id="2.7.1.4" title="Declaring an @Alternative stereotype">
     <assertion id="a">
-      <text>A stereotype may declare a @Alternative annotation, which specifies that every bean with the stereotype is a policy.</text>
+      <text>A stereotype may declare an |@Alternative| annotation, which specifies that every bean with the stereotype is an alternative.</text>
     </assertion>
   </section>
 
@@ -475,18 +506,22 @@
 
   </section>
 
-  <section id="2.7.2" title="Declaring the stereotypes for a bean">
-    <assertion id="a">
-      <text>Stereotype annotations may be applied to a bean class.</text>
-    </assertion>
+  <section id="2.7.2" title="Declaring the stereotypes for a bean">
+    <group>
+      <text>Stereotype annotations may be applied to a bean class or producer method or field.</text>
+      
+      <assertion id="a">
+        <text>Test with a bean class.</text>
+      </assertion>
 
-    <assertion id="b">
-      <text>Stereotype annotations may be applied to a producer method.</text>
-    </assertion>
+      <assertion id="b">
+        <text>Test with a producer method.</text>
+      </assertion>
 
-    <assertion id="c">
-      <text>Stereotype annotations may be applied to a producer field.</text>
-    </assertion>
+      <assertion id="c">
+        <text>Test with a producer field.</text>
+      </assertion>
+    </group>
 
     <assertion id="db">
     <text>The default scope declared by the stereotype may be overridden by the bean.</text>
@@ -499,7 +534,7 @@
 
   <section id="2.7.3" title="Built-in stereotypes">
     <assertion id="aa" testable="false">
-      <text>The built-in stereotype |@javax.enterprise.inject.stereotype.Model| is intended for use with beans that define the model layer of an MVC web application architecture such as JSF.</text>
+      <text>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.</text>
       <note>Tested by API signature test</note>
     </assertion>
   </section>
@@ -571,69 +606,38 @@
   <section id="3.1.3" title="Declaring a managed bean">
     <assertion id="a">
       <text>A managed bean with a constructor that takes no parameters does not require any special annotations</text>
+    </assertion>
+    
+    <assertion id="ab">
+      <text>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.</text>
     </assertion>
+
+    <group>
+      <text>A bean class may also specify a scope, name, stereotypes and/or qualifiers.</text>    
+      
+      <assertion id="ba">
+        <text>Test a bean with a scope.</text>
+      </assertion>
 
-    <assertion id="ba">
-      <text>A bean class may also specify a scope~, name, stereotypes and/or bindings~</text>
-    </assertion>
+      <assertion id="bb">
+        <text>Test a bean with a name.</text>
+      </assertion>
 
-    <assertion id="bb">
-      <text>A bean class may also specify a ~scope, ~name~, stereotypes and/or bindings~</text>
-    </assertion>
+      <assertion id="bd">
+        <text>Test a bean with a stereotype.</text>
+      </assertion>
 
-    <assertion id="bd">
-      <text>A bean class may also specify ~a scope, name, ~stereotypes~ and/or bindings~</text>
-    </assertion>
+      <assertion id="be">
+        <text>Test a bean with a qualifier.</text>
+      </assertion>
+    </group>
 
-    <assertion id="be">
-      <text>A bean class may also specify ~a scope, name, stereotypes and/or ~bindings</text>
-    </assertion>
-
     <assertion id="c">
-      <text>A managed bean may extend another managed bean</text>
+      <text>A managed bean may extend another managed bean.</text>
     </assertion>
   </section>
 
-  <section id="3.1.4" title="Bean constructors">
-    <assertion id="a">
-      <text>When the container instantiates a managed bean, it calls the bean constructor. The bean constructor is a constructor of the bean class</text>
-    </assertion>
-  </section>
-
-  <section id="3.1.4.1" title="Declaring a bean constructor">
-    <assertion id="a">
-      <text>The bean constructor may be identified by annotating the constructor |@Inject|</text>
-    </assertion>
-
-    <assertion id="ba">
-      <text>If a managed bean does not explicitly declare a constructor using |@Inject|, the constructor that accepts no parameters is the bean constructor</text>
-      <note>Can't check implicit constructor</note>
-    </assertion>
-
-    <assertion id="ca">
-      <text>If a managed bean has more than one constructor annotated |@Inject|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
-    </assertion>
-
-    <assertion id="da">
-      <text>If a bean constructor has a parameter annotated |@Disposes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
-    </assertion>
-
-    <assertion id="ea">
-      <text>If a bean constructor has a parameter annotated |@Observes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
-    </assertion>
-  </section>
-
-  <section id="3.1.4.2" title="Bean constructor parameters">
-    <assertion id="b">
-      <text>A bean constructor may have any number of parameters.</text>
-    </assertion>
-
-    <assertion id="c">
-      <text>All parameters of a bean constructor are injection points.</text>
-    </assertion>
-  </section>
-
-  <section id="3.1.5" title="Specializing a managed bean">
+  <section id="3.1.4" title="Specializing a managed bean">
     <assertion id="aa">
       <text>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".</text>
     </assertion>
@@ -732,28 +736,32 @@
   </section>
 
   <section id="3.2.3" title="Declaring a session bean">
-    <assertion id="a">
-      <text>A session bean does not require any special annotations</text>
+    <assertion id="aa">
+      <text>A session bean does not require any special annotations apart from the component-defining annotation (or XML declaration) required by the EJB specification.</text>
     </assertion>
+
+    <group>
+      <text>A bean class may also specify a scope, name, stereotypes and/or qualifiers.</text>    
+      
+      <assertion id="ba">
+        <text>Test a bean class with a scope.</text>
+      </assertion>
 
-    <assertion id="ba">
-      <text>A bean class may also specify a scope~, name, stereotypes and/or bindings~</text>
-    </assertion>
+      <assertion id="bb">
+        <text>Test a bean class with a name.</text>
+      </assertion>
 
-    <assertion id="bb">
-      <text>A bean class may also specify a ~scope, ~name~, stereotypes and/or bindings~</text>
-    </assertion>
+      <assertion id="bd">
+        <text>Test a bean class with a stereotype.</text>
+      </assertion>
 
-    <assertion id="bd">
-      <text>A bean class may also specify ~a scope, name, ~stereotypes~ and/or bindings~</text>
-    </assertion>
+      <assertion id="be">
+        <text>Test a bean class with a qualifier.</text>
+      </assertion>
+    </group>
 
-    <assertion id="be">
-      <text>A bean class may also specify ~a scope, name, stereotypes and/or ~bindings</text>
-    </assertion>
-
     <assertion id="c">
-      <text>A session bean class may extend another bean class</text>
+      <text>A session bean class may extend another bean class.</text>
     </assertion>
   </section>
 
@@ -865,19 +873,23 @@
     <assertion id="be">
       <text>A producer method may specify a binding type</text>
     </assertion>
+
+    <group>
+      <text>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, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+      
+      <assertion id="ca">
+        <text>Test with a producer method annotated |@Inject|.</text>
+      </assertion>
 
-    <assertion id="ca">
-      <text>If a producer method is annotated |@Inject|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
-    </assertion>
+      <assertion id="da">
+        <text>Test with a producer method annotated |@Disposes|.</text>
+      </assertion>
 
-    <assertion id="da">
-      <text>If a producer method has a parameter annotated |@Disposes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
-    </assertion>
+      <assertion id="ea">
+        <text>Test with a producer method annotated |@Observes|.</text>
+      </assertion>
+    </group>
 
-    <assertion id="ea">
-      <text>If a producer method has a parameter annotated |@Observes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
-    </assertion>
-
     <assertion id="fa">
       <text>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, as defined in Section 12.4, "Problems detected automatically by the container".</text>
     </assertion>
@@ -916,8 +928,8 @@
   </section>
 
   <section id="3.3.5" title="Disposer methods">
-    <assertion id="a">
-      <text>A disposer method must be a method of a managed bean class or session bean class.</text>
+    <assertion id="aa">
+      <text>A disposer method must be a non-abstract method of a managed bean class or session bean class.</text>
     </assertion>
 
     <assertion id="b">
@@ -957,7 +969,7 @@
     </assertion>
 
     <assertion id="b0">
-      <text>Bindings may be declared by annotating the disposed parameter.</text>
+      <text>Qualifiers may be declared by annotating the disposed parameter.</text>
     </assertion>
 
     <assertion id="ba">
@@ -983,7 +995,7 @@
 
   <section id="3.3.8" title="Disposer method parameters">
     <assertion id="a">
-      <text>In addition to the disposed parameter, a disposer method may declare additional parameters, which may also specify bindings. These additional parameters are injection points.</text>
+      <text>In addition to the disposed parameter, a disposer method may declare additional parameters, which may also specify qualifiers. These additional parameters are injection points.</text>
     </assertion>
   </section>
 
@@ -1158,7 +1170,7 @@
     </assertion>
 
     <assertion id="hh">
-      <text>The bean type and bindings of the resource are determined by the producer field declaration.</text>
+      <text>The bean type and qualifiers of the resource are determined by the producer field declaration.</text>
     </assertion>
 
   </section>
@@ -1171,44 +1183,87 @@
 
   <section id="3.6" title="Additional built-in beans">
     <assertion id="a">
-      <text>A Java EE or embeddable EJB container must provide a bean with binding |@Current| and bean type |javax.transaction.UserTransaction|, allowing injection of a reference to the JTA |UserTransaction|.</text>
+      <text>A Java EE or embeddable EJB container must provide a bean with binding |@Default| and bean type |javax.transaction.UserTransaction|, allowing injection of a reference to the JTA |UserTransaction|.</text>
     </assertion>
 
     <assertion id="b">
-      <text>A Java EE or embeddable EJB container must provide a bean with binding |@Current| and bean type |javax.security.Principal|, allowing injection of a |Principal| representing the current caller identity.</text>
+      <text>A Java EE or embeddable EJB container must provide a bean with binding |@Default| and bean type |javax.security.Principal|, allowing injection of a |Principal| representing the current caller identity.</text>
     </assertion>
 
     <assertion id="c">
-      <text>A Java EE or embeddable EJB container must provide a bean with binding |@Current| and bean type |javax.validation.ValidationFactory|, allowing injection of the default Bean Validation |ValidationFactory|.</text>
+      <text>A Java EE or embeddable EJB container must provide a bean with binding |@Default| and bean type |javax.validation.ValidationFactory|, allowing injection of the default Bean Validation |ValidationFactory|.</text>
     </assertion>
 
     <assertion id="d">
-      <text>A Java EE or embeddable EJB container must provide a bean with binding |@Current| and bean type |javax.validation.Validator|, allowing injection of a |Validator| for the default Bean Validation |ValidationFactory|.</text>
+      <text>A Java EE or embeddable EJB container must provide a bean with binding |@Default| and bean type |javax.validation.Validator|, allowing injection of a |Validator| for the default Bean Validation |ValidationFactory|.</text>
     </assertion>
 
     <assertion id="e">
-      <text>If a Java EE component class has an injection point of type |UserTransaction| and binding |@Current|, 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, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+      <text>If a Java EE component class has an injection point of type |UserTransaction| and binding |@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, as defined in Section 12.4, "Problems detected automatically by the container".</text>
     </assertion>
+  </section>
+  
+  <section id="3.7" title="Bean constructors">
+    <assertion id="a">
+      <text>When the container instantiates a managed bean, it calls the bean constructor. The bean constructor is a constructor of the bean class</text>
+    </assertion>
   </section>
 
-  <section id="3.7" title="Injected fields">
-    <assertion id="aa">
-      <text>An injected field is a non-static~, non-final~ field of a bean class.</text>
+  <section id="3.7.1" title="Declaring a bean constructor">
+    <assertion id="a">
+      <text>The bean constructor may be identified by annotating the constructor |@Inject|</text>
     </assertion>
 
-    <assertion id="ab">
-      <text>An injected field is a ~non-static, ~non-final field of a bean class.</text>
+    <assertion id="ba">
+      <text>If a bean class does not explicitly declare a constructor using |@Inject|, the constructor that accepts no parameters is the bean constructor.</text>
+      <note>Can't check implicit constructor</note>
     </assertion>
 
-    <assertion id="ba">
-      <text>An injected field is a non-static, ~non-final~ field of any Java EE component class supporting injection.</text>
+    <assertion id="ca">
+      <text>If a bean class has more than one constructor annotated |@Inject|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
     </assertion>
 
-    <assertion id="bb">
-      <text>An injected field is a ~non-static~, non-final field of any Java EE component class supporting injection.</text>
+    <assertion id="da">
+      <text>If a bean constructor has a parameter annotated |@Disposes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
     </assertion>
 
     <assertion id="ea">
+      <text>If a bean constructor has a parameter annotated |@Observes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+    </assertion>
+  </section>
+
+  <section id="3.7.2" title="Bean constructor parameters">
+    <assertion id="b">
+      <text>A bean constructor may have any number of parameters.</text>
+    </assertion>
+
+    <assertion id="c">
+      <text>All parameters of a bean constructor are injection points.</text>
+    </assertion>
+  </section>  
+
+  <section id="3.8" title="Injected fields">
+    <group>
+      <text>An injected field is a non-static, non-final field of a bean class, or of any Java EE component class supporting injection.</text>
+    
+      <assertion id="aa">
+        <text>Test a non-static field in a bean class.</text>
+      </assertion>
+
+      <assertion id="ab">
+        <text>Test a non-final field in a bean class.</text>
+      </assertion>
+
+      <assertion id="ba">
+        <text>Test a non-static field in a Java EE component class.</text>
+      </assertion>
+
+      <assertion id="bb">
+        <text>Test a non-final field in a Java EE component class.</text>
+      </assertion>
+    </group>
+
+    <assertion id="ea">
       <text>Injected fields are initialized by the container before initializer methods are called, and before the |@PostConstruct| callback occurs.</text>
     </assertion>
 
@@ -1217,23 +1272,39 @@
     </assertion>
   </section>
 
-  <section id="3.7.1" title="Declaring an injected field">
-    <assertion id="a">
-      <text>An injected field may be declared by annotating the field with any binding type.</text>
+  <section id="3.8.1" title="Declaring an injected field">
+    <assertion id="aa">
+      <text>An injected field may be declared by annotating the field |@javax.inject.Inject|.</text>
     </assertion>
   </section>
 
-  <section id="3.8" title="Initializer methods">
-    <assertion id="aa">
-      <text>An initializer method is a non-static method of a bean class.</text>
-    </assertion>
+  <section id="3.9" title="Initializer methods">
+    <group>
+      <text>An initializer method is a non-abstract, non-static method of a bean class, or of any Java EE component class supporting injection.</text>
+
+      <assertion id="aaa">
+        <text>Test with a non-abstract method of a bean-class.</text>
+      </assertion>
+    
+      <assertion id="aa">
+        <text>Test with a non-static method of a bean class.</text>
+      </assertion>
+      
+      <assertion id="caa">
+        <text>Test with a non-abstract method of a Java EE component class.</text>
+      </assertion>
+      
+      <assertion id="ca">
+        <text>Test with a non-static method of a Java EE component class.</text>
+      </assertion>
+    </group>
 
-    <assertion id="ca">
-      <text>An initializer method is a non-static method of any Java EE component class supporting injection.</text>
-    </assertion>
-
     <assertion id="e">
-      <text>If the bean is a session bean, the initializer method is not required to be a business method of the session bean</text>
+      <text>If the bean is a session bean, the initializer method is not required to be a business method of the session bean.</text>
+    </assertion>
+    
+    <assertion id="ea">
+      <text>A generic method may not be an initializer method.</text>
     </assertion>
 
     <assertion id="f">
@@ -1254,9 +1325,9 @@
     </assertion>
   </section>
 
-  <section id="3.8.1" title="Declaring an initializer method">
+  <section id="3.9.1" title="Declaring an initializer method">
     <assertion id="a">
-      <text>An initializer method may be declared by annotating the method |@javax.enterprise.inject.Initializer|</text>
+      <text>An initializer method may be declared by annotating the method |@javax.inject.Inject|</text>
     </assertion>
 
     <assertion id="ab">
@@ -1277,7 +1348,7 @@
 
   </section>
 
-  <section id="3.8.2" title="Initializer method parameters">
+  <section id="3.9.2" title="Initializer method parameters">
     <assertion id="aa">
       <text>An initializer method may have any number of parameters.</text>
     </assertion>
@@ -1287,13 +1358,23 @@
     </assertion>
   </section>
 
-  <section id="3.9" title="The default binding at injection points">
+  <section id="3.10" title="The default qualifier at injection points">
     <assertion id="a">
-      <text>If an injection point declares no binding, the default binding |@Current| is assumed.</text>
+      <text>If an injection point declares no qualifier, the default binding |@Default| is assumed.</text>
     </assertion>
+  </section>
+  
+  <section id="3.11" title="The qualifier @Named at injection points">
+    <assertion id="a">
+      <text>If an injected field declares a |@Named| annotation that does not specify the value member, the name of the field is assumed.</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>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, as defined in Section 12.4, "Problems detected automatically by the container".</text>   
+    </assertion>
   </section>
 
-  <section id="3.10" title="Beans with the @New binding">
+  <section id="3.12" title="Beans with the @New qualifier">
     <assertion id="d">
       <text>For each managed bean, a second bean exists which has the same bean class.</text>
     </assertion>
@@ -1375,11 +1456,11 @@
     </assertion>
 
     <assertion id="xb">
-      <text>This second bean is not a policy.</text>
+      <text>This second bean is not an alternative.</text>
     </assertion>
 
     <assertion id="z">
-      <text>When the binding |@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.</text>
+      <text>When the binding |@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.</text>
     </assertion>
   </section>
 

Modified: tck/trunk/impl/src/main/resources/tck-audit-mb.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit-mb.xml	2009-09-19 16:08:53 UTC (rev 3708)
+++ tck/trunk/impl/src/main/resources/tck-audit-mb.xml	2009-09-21 02:09:51 UTC (rev 3709)
@@ -72,8 +72,9 @@
       <text>The name can be specified using an element of the |ManagedBean| annotation.</text>
     </assertion>
     
-    <assertion id="c">
+    <assertion id="c" testable="false">
       <text>Managed Bean names must be unique within a Java EE module.  It is an error if a Java EE module contains an EJB component and a Managed Bean with the same name.</text>
+      <note>The behaviour here is unspecified.</note>
     </assertion>
     
     <group>




More information about the weld-commits mailing list