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

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Wed Feb 18 20:19:46 EST 2009


Author: pete.muir at jboss.org
Date: 2009-02-18 20:19:45 -0500 (Wed, 18 Feb 2009)
New Revision: 1592

Modified:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/Order.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java
   tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Map the rest of Simple bean definiton

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/Order.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/Order.java	2009-02-19 01:11:29 UTC (rev 1591)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/Order.java	2009-02-19 01:19:45 UTC (rev 1592)
@@ -6,4 +6,6 @@
 class Order
 {
 
+   public static boolean constructed = true;
+   
 }

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java	2009-02-19 01:11:29 UTC (rev 1591)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java	2009-02-19 01:19:45 UTC (rev 1592)
@@ -4,7 +4,6 @@
 import java.util.List;
 
 import javax.inject.DefinitionException;
-import javax.inject.manager.Bean;
 
 import org.hibernate.tck.annotations.SpecAssertion;
 import org.hibernate.tck.annotations.SpecAssertions;
@@ -177,7 +176,7 @@
    }
 
    @Test
-   @SpecAssertion(section = "3.2.5.1", id = "unknown")
+   @SpecAssertion(section = "3.2.6.1", id = "a")
    public void testInitializerAnnotatedConstructor() throws Exception
    {
       deployBeans(Sheep.class);
@@ -186,6 +185,7 @@
          @Override
          protected void execute() throws Exception
          {
+            Sheep.constructedCorrectly = false;
             getCurrentManager().getInstanceByType(Sheep.class);
             assert Sheep.constructedCorrectly;
 
@@ -195,23 +195,29 @@
    }
 
    @Test
-   @SpecAssertion(section = "3.2.5.1", id = "unknown")
+   @SpecAssertion(section = "3.2.6.1", id = "b")
    public void testImplicitConstructorUsed()
    {
-      Bean<Order> order = createSimpleBean(Order.class);
-      // TODO Test this properly!
+      deployBeans(Order.class);
+      Order.constructed = false;
+      getCurrentManager().getInstanceByType(Order.class);
+      assert Order.constructed;
    }
 
    @Test
-   @SpecAssertion(section = "3.2.6.1", id = "unknown")
+   @SpecAssertions({
+      @SpecAssertion(section = "3.2.5", id = "a"), 
+      @SpecAssertion(section = "3.2.6.1", id = "b")
+   })
    public void testEmptyConstructorUsed()
    {
+      Donkey.constructedCorrectly = false;
       createSimpleBean(Donkey.class).create(new MockCreationalContext<Donkey>());
       assert Donkey.constructedCorrectly;
    }
 
    @Test
-   @SpecAssertion(section = "3.2.6.1", id = "unknown")
+   @SpecAssertion(section = "3.2.6.1", id = "a")
    public void testInitializerAnnotatedConstructorUsedOverEmptyConstuctor() throws Exception
    {
       deployBeans(Turkey.class);
@@ -227,14 +233,14 @@
    }
 
    @Test(expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "3.2.6.1", id = "unknown")
+   @SpecAssertion(section = "3.2.6.1", id = "c")
    public void testTooManyInitializerAnnotatedConstructor()
    {
       createSimpleBean(Goose_Broken.class);
    }
 
    @Test(expectedExceptions = DefinitionException.class, groups = { "broken", "disposalMethod" })
-   @SpecAssertion(section = "3.2.6.1", id = "unknown")
+   @SpecAssertion(section = "3.2.6.1", id = "d")
    public void testConstructorHasDisposesParameter() throws Exception
    {
       deployBeans(DisposingConstructor_Broken.class, Duck.class);
@@ -251,35 +257,35 @@
    }
 
    @Test(expectedExceptions = DefinitionException.class, groups = { "broken", "observerMethod" })
-   @SpecAssertion(section = "3.2.6.1", id = "unknown")
+   @SpecAssertion(section = "3.2.6.1", id = "e")
    public void testConstructorHasObservesParameter()
    {
       deployBeans(ObservingConstructor_Broken.class);
    }
 
    @Test(groups = { "stub", "webbeansxml" })
-   @SpecAssertion(section = "3.2.6.2", id = "unknown")
+   @SpecAssertion(section = "3.2.6.2", id = "b")
    public void testImplicitConstructorDeclaredInXmlUsed()
    {
       assert false;
    }
 
    @Test(groups = { "stub", "webbeansxml" })
-   @SpecAssertion(section = "3.2.6.2", id = "unknown")
+   @SpecAssertion(section = "3.2.6.2", id = "b")
    public void testEmptyConstructorDeclaredInXmlUsed()
    {
       assert false;
    }
 
    @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "webbeansxml" })
-   @SpecAssertion(section = "3.2.6.2", id = "unknown")
+   @SpecAssertion(section = "3.2.6.2", id = "c")
    public void testConstructorDeclaredInXmlDoesNotExist()
    {
       assert false;
    }
 
    @Test(groups = { "stub", "webbeansxml" })
-   @SpecAssertion(section = "3.2.6.2", id = "unknown")
+   @SpecAssertion(section = "3.2.6.2", id = "d")
    public void testConstructorDeclaredInXmlIgnoresBindingTypesDeclaredInJava()
    {
       assert false;

Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml	2009-02-19 01:11:29 UTC (rev 1591)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml	2009-02-19 01:19:45 UTC (rev 1592)
@@ -862,13 +862,11 @@
   </section>
   
   <section id="3.2.6" title="Bean constructors">
+    
     <assertion id="a">
       <text>When the container instantiates a simple bean, it calls the bean constructor. The bean constructor is a constructor of the bean class</text>
     </assertion>
     
-    <assertion id="b">
-      <text>The application may call bean constructors directly. However, if the application directly instantiates the bean, no parameters are passed to the constructor by the container; the returned object is not bound to any context; no dependencies are injected by the container; and the lifecycle of the new instance is not managed by the container</text>
-    </assertion>
   </section>
   
   <section id="3.2.6.1" title="Declaring a bean constructor using annotations">




More information about the weld-commits mailing list