[webbeans-commits] Webbeans SVN: r1480 - in tck/trunk/impl: src/main/java/org/jboss/jsr299/tck/unit/definition/bean and 1 other directory.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Tue Feb 10 20:57:42 EST 2009


Author: shane.bryzak at jboss.com
Date: 2009-02-10 20:57:42 -0500 (Tue, 10 Feb 2009)
New Revision: 1480

Modified:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/bean/BeanDefinitionTest.java
   tck/trunk/impl/tck-audit.xml
Log:
Map more section 2 tests to assertions

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/bean/BeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/bean/BeanDefinitionTest.java	2009-02-11 00:07:04 UTC (rev 1479)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/bean/BeanDefinitionTest.java	2009-02-11 01:57:42 UTC (rev 1480)
@@ -41,15 +41,15 @@
    // throws a definition exception if any of these occur
    
    @Test
-   @SpecAssertion(section = "2", id = "unknown")
-   public void testApiTypesNonEmpty()
+   @SpecAssertion(section = "2", id = "a")
+   public void testBeanTypesNonEmpty()
    {
       assert manager.resolveByType(RedSnapper.class).size() == 1;
       assert manager.resolveByType(RedSnapper.class).iterator().next().getTypes().size() > 0;
    }
    
    @Test
-   @SpecAssertion(section = "2", id = "unknown")
+   @SpecAssertion(section = "2", id = "b")
    public void testBindingTypesNonEmpty()
    {
       assert manager.resolveByType(RedSnapper.class).size() == 1;
@@ -57,7 +57,7 @@
    }
    
    @Test
-   @SpecAssertion(section = "2", id = "unknown")
+   @SpecAssertion(section = "2", id = "c")
    public void testHasScopeType()
    {
       assert manager.resolveByType(RedSnapper.class).size() == 1;
@@ -65,7 +65,7 @@
    }
    
    @Test
-   @SpecAssertion(section = "2", id = "unknown")
+   @SpecAssertion(section = "2", id = "d")
    public void testHasDeploymentType()
    {
       assert manager.resolveByType(RedSnapper.class).size() == 1;
@@ -73,7 +73,7 @@
    }
    
    @Test(groups = "producerMethod")
-   @SpecAssertion(section = "5.2", id = "unknown")
+   @SpecAssertion(section = "5.2", id = "b")
    public void testIsNullable() throws Exception
    {
       assert manager.resolveByType(Integer.class).size() == 1;
@@ -87,7 +87,10 @@
    @Test
    @SpecAssertions({
      @SpecAssertion(section = "3.2.2", id = "unknown"),
-     @SpecAssertion(section = "2.2", id = "unknown")
+     @SpecAssertion(section = "2.2", id = "a"),
+     @SpecAssertion(section = "2.2", id = "d"),
+     @SpecAssertion(section = "2.2", id = "e"),
+     @SpecAssertion(section = "2.2", id = "k")
    })
    public void testBeanTypes()
    {
@@ -103,7 +106,7 @@
    }
    
    @Test
-   @SpecAssertion(section = "2.2", id = "unknown")
+   @SpecAssertion(section = "2.2", id = "g")
    public void testFinalApiType()
    {
       manager.resolveByType(DependentFinalTuna.class);

Modified: tck/trunk/impl/tck-audit.xml
===================================================================
--- tck/trunk/impl/tck-audit.xml	2009-02-11 00:07:04 UTC (rev 1479)
+++ tck/trunk/impl/tck-audit.xml	2009-02-11 01:57:42 UTC (rev 1480)
@@ -1,7 +1,90 @@
 <specification xmlns="http://jboss.com/products/webbeans/tck/audit"
     name="JSR-299: Java Contexts and Dependency Injection" 
     version="Revised Public Review Draft">
+
+  <section id="2" title="Bean definition">
+  
+    <assertion id="a">
+      <text>A bean comprises of a (nonempty) set of bean types</text>
+    </assertion>
     
+    <assertion id="b">
+      <text>A bean comprises of a (nonempty) set of bindings</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>A bean comprises of a scope</text>
+    </assertion>
+    
+    <assertion id="d">
+      <text>A bean comprises of a deployment type</text>
+    </assertion>
+    
+    <assertion id="e">
+      <text>A bean comprises of an optional bean name</text>
+    </assertion>
+    
+    <assertion id="f">
+      <text>A bean comprises of a set of interceptor bindings</text>
+    </assertion>
+    
+    <assertion id="g">
+      <text>A bean comprises of a bean implementation</text>
+    </assertion>
+  </section>
+  
+  <section id="2.2" title="Bean types">
+  
+    <assertion id="a">
+      <text>A bean may have multiple bean types</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>A bean type may be a parameterized type with an actual type parameter. For the purposes of the typesafe resolution algorithm defined in Section 5.9, "Typesafe resolution algorithm", parameterized bean types are considered identical by the container only if both the type and the type parameters (if any) are identical</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>Bean types may not declare a type variable or wildcard. If the type of an injection point is a parameterized type with a type variable or wildcard, a DefinitionException is thrown by the container at deployment time.</text>
+    </assertion>
+    
+    <assertion id="d">
+      <text>A bean type may be an interface</text>
+    </assertion>
+    
+    <assertion id="e">
+      <text>A bean type may be a concrete class</text>
+    </assertion>
+    
+    <assertion id="f">
+      <text>A bean type may be an abstract class</text>
+    </assertion>
+    
+    <assertion id="g">
+      <text>A bean type may be declared final</text>
+    </assertion>
+    
+    <assertion id="h">
+      <text>A bean type may have final methods</text>
+    </assertion>
+    
+    <assertion id="i">
+      <text>A bean type may be an array type. Two array types are considered identical only if the element type is identical</text>
+    </assertion>
+    
+    <assertion id="j">
+      <text>A bean type may be a primitive types. Primitive types are considered to be identical to their corresponding wrapper types in java.lang.</text>
+    </assertion>
+    
+    <assertion id="k">
+      <text>All beans have the bean type java.lang.Object</text>
+    </assertion>
+    
+    <assertion id="l">
+      <text>A client of a bean may typecast its reference to any instance of the bean to any bean type of the bean</text>
+    </assertion>
+  
+  </section>
+    
   <section id="2.3.1" title="Default binding type">
   
     <assertion id="a">




More information about the weld-commits mailing list