[webbeans-commits] Webbeans SVN: r2894 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean and 5 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Thu Jun 25 19:04:36 EDT 2009


Author: dallen6
Date: 2009-06-25 19:04:35 -0400 (Thu, 25 Jun 2009)
New Revision: 2894

Modified:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/FishPond.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/newAndOtherBindingType/NewAndOtherBindingTypeTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/InjectionOfResourceTest.java
   tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Additional tests upgraded to 20090519 version of the spec assertions.

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/FishPond.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/FishPond.java	2009-06-25 21:31:32 UTC (rev 2893)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/FishPond.java	2009-06-25 23:04:35 UTC (rev 2894)
@@ -9,13 +9,16 @@
    
    public Animal goldfish;
    
+   public Goose goose;
+   
    @Current
    public Salmon salmon;
    
    @Initializer
-   public FishPond(Goldfish goldfish)
+   public FishPond(Goldfish goldfish, Goose goose)
    {
       this.goldfish = goldfish;
+      this.goose = goose;
    }
    
    @PreDestroy

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java	2009-06-25 21:31:32 UTC (rev 2893)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java	2009-06-25 23:04:35 UTC (rev 2894)
@@ -34,7 +34,8 @@
 
    @Test(groups = "beanConstruction")
    @SpecAssertions({
-     @SpecAssertion(section = "3.2.6.3", id = "a"),
+     @SpecAssertion(section = "3.2.4.2", id = "b"),
+     @SpecAssertion(section = "3.2.4.2", id = "c"),
      @SpecAssertion(section = "2.3.6", id = "d")
    })
    public void testInjectionOfParametersIntoBeanConstructor()
@@ -42,10 +43,11 @@
       assert getBeans(FishPond.class).size() == 1;
       FishPond fishPond = getInstanceByType(FishPond.class);
       assert fishPond.goldfish != null;
+      assert fishPond.goose != null;
    }
    
    @Test
-   @SpecAssertion(section = "3.2.6.3", id = "a")
+   @SpecAssertion(section = "3.2.4.2", id = "b")
    public void testBindingTypeAnnotatedConstructor() throws Exception
    {
       new RunInDependentContext()
@@ -60,7 +62,7 @@
    }
 
    @Test(groups = { "specialization" })
-   @SpecAssertion(section = "3.2.7", id = "c")
+   @SpecAssertion(section = "3.2.5", id = "aa")
    public void testSpecializedBeanAlwaysUsed() throws Exception
    {
       new RunInDependentContext()
@@ -77,8 +79,8 @@
 
    @Test(groups = "beanLifecycle")
    @SpecAssertions({
-      @SpecAssertion(section = "6.1", id = "b"),
-      @SpecAssertion(section = "6.2", id = "d")
+      @SpecAssertion(section = "6.1", id = "d"),
+      @SpecAssertion(section = "6.1", id = "e")
    })
    public void testCreateReturnsSameBeanPushed() throws Exception
    {
@@ -103,11 +105,11 @@
       
    @Test(groups = "beanLifecycle")
    @SpecAssertions({
-      @SpecAssertion(section = "6.2", id = "a"),
+      @SpecAssertion(section = "6.1.1", id = "a"),
       @SpecAssertion(section="2", id="g"),
       @SpecAssertion(section="2.2", id="f"),
       @SpecAssertion(section="3.2.6", id="a"),
-      @SpecAssertion(section = "6", id = "d")
+      @SpecAssertion(section = "7", id = "d")
    })
    public void testCreateReturnsInstanceOfBean()
    {
@@ -117,7 +119,7 @@
 
    @Test(groups = "injection")
    @SpecAssertions({
-      @SpecAssertion(section = "6.4", id = "e"),
+      @SpecAssertion(section = "7.2", id = "c"),
       @SpecAssertion(section = "3.8.1", id = "a")
    })
    public void testCreateInjectsFieldsDeclaredInJava()
@@ -129,7 +131,7 @@
 
    @Test(groups = "beanLifecycle")
    @SpecAssertions({
-      @SpecAssertion(section = "6", id = "g")
+      @SpecAssertion(section = "6.2", id = "l")
    })
    public void testContextCreatesNewInstanceForInjection()
    {
@@ -142,9 +144,8 @@
 
    @Test(groups = { "beanLifecycle", "lifecycleCallbacks" })
    @SpecAssertions({
-     @SpecAssertion(section = "6.2", id = "f"),
-     @SpecAssertion(section = "6.3", id = "b"),
-     @SpecAssertion(section = "6.4", id = "k")
+     @SpecAssertion(section = "7.2", id = "d"),
+     @SpecAssertion(section = "7.2", id = "e")
    })
    public void testPostConstructPreDestroy() throws Exception
    {
@@ -160,8 +161,7 @@
 
    @Test(groups = { "beanLifecycle", "lifecycleCallbacks" })
    @SpecAssertions({
-     @SpecAssertion(section = "6.3", id = "a"),
-     @SpecAssertion(section = "6.3", id = "c")
+     @SpecAssertion(section = "6.1.2", id = "a")
    })
    public void testContextualDestroyDisposesWhenNecessary() throws Exception
    {
@@ -177,7 +177,7 @@
 
    @Test(groups = "beanLifecycle")
    @SpecAssertions({
-      @SpecAssertion(section = "6.3", id = "d")
+      @SpecAssertion(section = "6.1.2", id = "a")
    })
    public void testContextualDestroyCatchesException()
    {
@@ -189,7 +189,8 @@
 
    @Test(groups = "beanLifecycle")
    @SpecAssertions({
-      @SpecAssertion(section = "6.4", id = "l")
+      @SpecAssertion(section = "6.1.2", id = "a"),
+      @SpecAssertion(section = "6.4.3", id = "a")
    })
    public void testDependentsDestroyedAfterPreDestroy()
    {
@@ -200,6 +201,7 @@
       assert Salmon.isBeanDestroyed();
    }
 
+   //Diese ist noch ältere
    @Test
    @SpecAssertion(section = "4.2", id = "baa")
    public void testSubClassInheritsPostConstructOnSuperclass() throws Exception

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java	2009-06-25 21:31:32 UTC (rev 2893)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java	2009-06-25 23:04:35 UTC (rev 2894)
@@ -13,6 +13,7 @@
 import javax.enterprise.inject.spi.Bean;
 
 import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
 import org.jboss.jsr299.tck.AbstractJSR299Test;
 import org.jboss.jsr299.tck.literals.AnyLiteral;
 import org.jboss.jsr299.tck.literals.CurrentLiteral;
@@ -22,7 +23,7 @@
 
 /**
  * 
- * Spec version: PRD2
+ * Spec version: 20090519
  * 
  */
 @Artifact
@@ -34,7 +35,9 @@
    };
 
    @Test(groups = { "new" })
-   @SpecAssertion(section = "3.2.5", id = "d")
+   @SpecAssertions({
+      @SpecAssertion(section = "3.11", id = "p")
+   })
    public void testNewBeanIsDependentScoped()
    {
       Set<Bean<ExplicitContructorSimpleBean>> beans = getBeans(ExplicitContructorSimpleBean.class, new NewLiteral());
@@ -44,7 +47,7 @@
    }
 
    @Test(groups = { "new" })
-   @SpecAssertion(section = "3.2.5", id = "e")
+   @SpecAssertion(section = "3.11", id = "q")
    public void testNewBeanIsOfStandardDeploymentType()
    {
       Set<Bean<ExplicitContructorSimpleBean>> beans = getBeans(ExplicitContructorSimpleBean.class, new NewLiteral());
@@ -54,7 +57,7 @@
    }
 
    @Test(groups = { "new" })
-   @SpecAssertion(section = "3.2.5", id = "f")
+   @SpecAssertion(section = "3.11", id = "r")
    public void testNewBeanHasOnlyNewBinding()
    {
       Set<Bean<ExplicitContructorSimpleBean>> beans = getBeans(ExplicitContructorSimpleBean.class, new NewLiteral());
@@ -65,7 +68,7 @@
    }
 
    @Test(groups = { "new" })
-   @SpecAssertion(section = "3.2.5", id = "g")
+   @SpecAssertion(section = "3.11", id = "s")
    public void testNewBeanHasNoWebBeanName()
    {
       Set<Bean<ExplicitContructorSimpleBean>> beans = getBeans(ExplicitContructorSimpleBean.class, new NewLiteral());
@@ -75,7 +78,7 @@
    }
 
    @Test(groups = { "new" })
-   @SpecAssertion(section = "3.2.5", id = "h")
+   @SpecAssertion(section = "3.11", id = "t")
    public void testNewBeanHasNoStereotypes()
    {
       Bean<Fox> foxBean = getBeans(Fox.class).iterator().next();
@@ -87,7 +90,7 @@
    }
 
    @Test(groups = { "new" })
-   @SpecAssertion(section = "3.2.5", id = "i")
+   @SpecAssertion(section = "3.11", id = "u")
    public void testNewBeanHasNoObservers()
    {
       // As long as only one observer exists here, we know it is not from the @New bean
@@ -95,7 +98,7 @@
    }
 
    @Test(groups = { "new" })
-   @SpecAssertion(section = "3.2.5", id = "k")
+   @SpecAssertion(section = "3.11", id = "w")
    public void testNewBeanHasNoProducerFields() throws Exception
    {
       new RunInDependentContext()
@@ -116,7 +119,7 @@
    }
 
    @Test(groups = { "new" })
-   @SpecAssertion(section = "3.2.5", id = "j")
+   @SpecAssertion(section = "3.11", id = "v")
    public void testNewBeanHasNoProducerMethods() throws Exception
    {
       new RunInDependentContext()
@@ -137,7 +140,7 @@
    }
 
    @Test(groups = { "new" })
-   @SpecAssertion(section = "3.2.5", id = "l")
+   @SpecAssertion(section = "3.11", id = "x")
    public void testNewBeanHasNoDisposalMethods() throws Exception
    {
       new RunInDependentContext()
@@ -172,7 +175,7 @@
    }
 
    @Test
-   @SpecAssertion(section = "3.2.5", id = "a")
+   @SpecAssertion(section = "3.11", id = "d")
    public void testForEachSimpleBeanANewBeanExists()
    {
       assert getCurrentManager().getBeans(Order.class).size() == 1;
@@ -194,7 +197,7 @@
    }
 
    @Test(groups = { "new" })
-   @SpecAssertion(section = "3.2.5", id = "ba")
+   @SpecAssertion(section = "3.11", id = "f")
    public void testNewBeanHasSameConstructor()
    {
       ExplicitContructorSimpleBean.setConstructorCalls(0);
@@ -205,7 +208,7 @@
    }
 
    @Test(groups = { "new" })
-   @SpecAssertion(section = "3.2.5", id = "bb")
+   @SpecAssertion(section = "3.11", id = "g")
    public void testNewBeanHasSameInitializers()
    {
       InitializerSimpleBean.setInitializerCalls(0);
@@ -217,7 +220,7 @@
    }
 
    @Test(groups = { "new" })
-   @SpecAssertion(section = "3.2.5", id = "bc")
+   @SpecAssertion(section = "3.11", id = "h")
    public void testNewBeanHasSameInjectedFields()
    {
       Bean<InitializerSimpleBean> simpleBean = getBeans(InitializerSimpleBean.class).iterator().next();

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/newAndOtherBindingType/NewAndOtherBindingTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/newAndOtherBindingType/NewAndOtherBindingTypeTest.java	2009-06-25 21:31:32 UTC (rev 2893)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/newAndOtherBindingType/NewAndOtherBindingTypeTest.java	2009-06-25 23:04:35 UTC (rev 2894)
@@ -8,6 +8,11 @@
 import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
 import org.testng.annotations.Test;
 
+/**
+ * 
+ * Spec version: 20090519
+ *
+ */
 @Artifact
 @ExpectedDeploymentException(DefinitionError.class)
 public class NewAndOtherBindingTypeTest extends AbstractJSR299Test

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java	2009-06-25 21:31:32 UTC (rev 2893)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java	2009-06-25 23:04:35 UTC (rev 2894)
@@ -33,6 +33,8 @@
 /**
  * EJB injection tests for simple beans.
  * 
+ * Spec version: 20090519
+ * 
  * @author David Allen
  *
  */

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java	2009-06-25 21:31:32 UTC (rev 2893)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java	2009-06-25 23:04:35 UTC (rev 2894)
@@ -19,6 +19,8 @@
 /**
  * Injection of persistence related objects.
  * 
+ * Spec version: 20090519
+ *
  * @author David Allen
  *
  */
@@ -33,7 +35,7 @@
 {
    @Test(groups = { "beanLifecycle", "commonAnnotations", "integration" })
    @SpecAssertions( { 
-      @SpecAssertion(section = "6.4", id = "c")
+      @SpecAssertion(section = "3.6.1", id = "cc")
    })
    public void testInjectionOfPersistenceContext()
    {
@@ -46,9 +48,11 @@
    }
    
    @Test(groups = { "broken", "beanLifecycle", "commonAnnotations", "integration" })
+   @SpecAssertions( { 
+      @SpecAssertion(section = "3.6.1", id = "dd")
+   })
    public void testInjectionOfPersistenceUnit()
    {
-      //TODO There is no spec assertion for this test and it does not work, but there is bean support for persistence units
       Bean<SimpleBean> simpleBeanBean = getBeans(SimpleBean.class).iterator().next();
       SimpleBean simpleBean = createBeanInstance(simpleBeanBean);
       EntityManagerFactory entityManagerFactory = simpleBean.getPersistenceUnit();

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/InjectionOfResourceTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/InjectionOfResourceTest.java	2009-06-25 21:31:32 UTC (rev 2893)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/InjectionOfResourceTest.java	2009-06-25 23:04:35 UTC (rev 2894)
@@ -12,6 +12,11 @@
 import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
 import org.testng.annotations.Test;
 
+/**
+ * 
+ * Spec version: 20090519
+ *
+ */
 @Artifact
 @Packaging(PackagingType.WAR)
 @IntegrationTest
@@ -19,7 +24,7 @@
 public class InjectionOfResourceTest extends AbstractJSR299Test
 {
    @Test(groups = { "ri-broken", "beanLifecycle", "commonAnnotations", "integration" })
-   @SpecAssertion(section = "6.4", id = "d")
+   @SpecAssertion(section = "3.6.1", id = "bb")
    public void testInjectionOfResource()
    {
       Bean<SimpleBean> simpleBeanBean = getBeans(SimpleBean.class).iterator().next();

Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml	2009-06-25 21:31:32 UTC (rev 2893)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml	2009-06-25 23:04:35 UTC (rev 2894)
@@ -1612,39 +1612,39 @@
       <text>This second bean has scope |@Dependent|.</text>
     </assertion>
     
-    <assertion id="p">
+    <assertion id="q">
       <text>This second bean has deployment type |@Standard|.</text>
     </assertion>
     
-    <assertion id="p">
+    <assertion id="r">
       <text>This second bean has exactly one binding: |@javax.enterprise.inject.New(X.class)| where |x| is the bean class.</text>
     </assertion>
     
-    <assertion id="q">
+    <assertion id="s">
       <text>This second bean has no bean EL name.</text>
     </assertion>
     
-    <assertion id="r">
+    <assertion id="t">
       <text>This second bean has no stereotypes.</text>
     </assertion>
     
-    <assertion id="s">
+    <assertion id="u">
       <text>This second bean has no observer methods.</text>
     </assertion>
     
-    <assertion id="t">
+    <assertion id="v">
       <text>This second bean has no producer methods.</text>
     </assertion>
     
-    <assertion id="u">
+    <assertion id="w">
       <text>This second bean has no producer fields.</text>
     </assertion>
     
-    <assertion id="v">
+    <assertion id="x">
       <text>This second bean has no disposal methods.</text>
     </assertion>
     
-    <assertion id="w">
+    <assertion id="y">
     <text>This bean is available even if the bean class declares a disabled deployment type.</text>
     </assertion>
   </section>




More information about the weld-commits mailing list