[webbeans-commits] Webbeans SVN: r1133 - tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Tue Jan 20 17:31:23 EST 2009


Author: pete.muir at jboss.org
Date: 2009-01-20 17:31:23 -0500 (Tue, 20 Jan 2009)
New Revision: 1133

Modified:
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/Horse.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/RealizationTest.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/Stable.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/TameCow.java
Log:
enable more realization tests

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/Horse.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/Horse.java	2009-01-20 22:30:59 UTC (rev 1132)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/Horse.java	2009-01-20 22:31:23 UTC (rev 1133)
@@ -1,6 +1,8 @@
 package org.jboss.webbeans.tck.unit.inheritance.realization;
 
- at AnotherDeploymentType
+import javax.webbeans.Realizes;
+
+ at AnotherDeploymentType @Realizes
 class Horse extends AbstractHorse
 {
    

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/RealizationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/RealizationTest.java	2009-01-20 22:30:59 UTC (rev 1132)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/RealizationTest.java	2009-01-20 22:31:23 UTC (rev 1133)
@@ -16,6 +16,9 @@
 public class RealizationTest extends AbstractTest
 {
    
+   private static Annotation SMELLY_LITERAL = new AnnotationLiteral<Smelly>(){}; 
+   
+   
    @Override
    protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
    {
@@ -30,34 +33,34 @@
    public void testRealizedBeanWithProducerMethodHasSameScope()
    {
       deployBeans(Cow.class);
-      assert manager.resolveByType(Dung.class, new AnnotationLiteral<Smelly>(){}).size() == 1;
-      assert manager.resolveByType(Dung.class, new AnnotationLiteral<Smelly>(){}).iterator().next().getScopeType().equals(RequestScoped.class);
+      assert manager.resolveByType(Dung.class, SMELLY_LITERAL).size() == 1;
+      assert manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getScopeType().equals(RequestScoped.class);
    }
    
    @Test(groups="broken") @SpecAssertion(section="4.1")
-   public void testRealizedBeanWithProducerMethodHasScopeOfRealizingClass()
+   public void testRealizedBeanWithProducerMethodHasDeploymentTypeOfRealizingClass()
    {
       deployBeans(Cow.class);
-      assert manager.resolveByType(Dung.class).size() == 1;
-      assert manager.resolveByType(Dung.class).iterator().next().getDeploymentType().equals(AnotherDeploymentType.class);
+      assert manager.resolveByType(Dung.class, SMELLY_LITERAL).size() == 1;
+      assert manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getDeploymentType().equals(AnotherDeploymentType.class);
    }
    
-   @Test(groups="broken") @SpecAssertion(section="4.1")
+   @Test @SpecAssertion(section="4.1")
    public void testRealizedBeanWithProducerMethodHasSameBindings()
    {
       deployBeans(Cow.class);
-      assert manager.resolveByType(Dung.class).size() == 1;
-      assert manager.resolveByType(Dung.class).iterator().next().getBindings().size() == 1;
-      assert manager.resolveByType(Dung.class).iterator().next().getBindings().iterator().next().annotationType().equals(Smelly.class);
+      assert manager.resolveByType(Dung.class, SMELLY_LITERAL).size() == 1;
+      assert manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getBindings().size() == 1;
+      assert manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getBindings().iterator().next().annotationType().equals(Smelly.class);
    }
    
    @Test(groups="broken") @SpecAssertion(section="4.1")
    public void testRealizedBeanWithProducerMethodHasBindingsOfMethodAndRealizingType()
    {
       deployBeans(TameCow.class);
-      assert manager.resolveByType(Dung.class).size() == 1;
-      assert manager.resolveByType(Dung.class).iterator().next().getBindings().size() == 2;
-      assert annotationSetMatches(manager.resolveByType(Dung.class).iterator().next().getBindings(), Smelly.class, Tame.class);
+      assert manager.resolveByType(Dung.class, SMELLY_LITERAL).size() == 1;
+      assert manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getBindings().size() == 2;
+      assert annotationSetMatches(manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getBindings(), Smelly.class, Tame.class);
    }
    
    @Test @SpecAssertion(section="4.1")
@@ -74,29 +77,29 @@
       assert false;
    }
    
-   @Test(groups="broken") @SpecAssertion(section="4.1")
+   @Test @SpecAssertion(section="4.1")
    public void testRealizedBeanWithProducerFieldHasSameScope()
    {
       deployBeans(Horse.class);
-      assert manager.resolveByType(Dung.class).size() == 1;
-      assert manager.resolveByType(Dung.class).iterator().next().getScopeType().equals(RequestScoped.class);
+      assert manager.resolveByType(Dung.class, SMELLY_LITERAL).size() == 1;
+      assert manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getScopeType().equals(RequestScoped.class);
    }
    
    @Test(groups="broken") @SpecAssertion(section="4.1")
-   public void testRealizedBeanWithProducerFieldHasScopeOfRealizingClass()
+   public void testRealizedBeanWithProducerFieldHasDeploymentTypeOfRealizingClass()
    {
       deployBeans(Horse.class);
       assert manager.resolveByType(Dung.class).size() == 1;
       assert manager.resolveByType(Dung.class).iterator().next().getDeploymentType().equals(AnotherDeploymentType.class);
    }
    
-   @Test(groups="broken") @SpecAssertion(section="4.1")
+   @Test @SpecAssertion(section="4.1")
    public void testRealizedBeanWithProducerFieldHasSameBindings()
    {
       deployBeans(Horse.class);
-      assert manager.resolveByType(Dung.class).size() == 1;
-      assert manager.resolveByType(Dung.class).iterator().next().getBindings().size() == 1;
-      assert manager.resolveByType(Dung.class).iterator().next().getBindings().iterator().next().annotationType().equals(Smelly.class);
+      assert manager.resolveByType(Dung.class, SMELLY_LITERAL).size() == 1;
+      assert manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getBindings().size() == 1;
+      assert manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getBindings().iterator().next().annotationType().equals(Smelly.class);
    }
    
    @Test(groups="broken") @SpecAssertion(section="4.1")
@@ -108,7 +111,7 @@
       assert annotationSetMatches(manager.resolveByType(Dung.class).iterator().next().getBindings(), Smelly.class, Tame.class);
    }
    
-   @Test(groups="broken") @SpecAssertion(section="4.1")
+   @Test @SpecAssertion(section="4.1")
    public void testRealizedBeanWithProducerFieldHasSameStereotypes()
    {
       deployBeans(Stable.class);

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/Stable.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/Stable.java	2009-01-20 22:30:59 UTC (rev 1132)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/Stable.java	2009-01-20 22:31:23 UTC (rev 1133)
@@ -1,6 +1,9 @@
 package org.jboss.webbeans.tck.unit.inheritance.realization;
 
-public class Stable
+import javax.webbeans.Realizes;
+
+ at Realizes
+class Stable extends AbstractStable
 {
    
 }

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/TameCow.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/TameCow.java	2009-01-20 22:30:59 UTC (rev 1132)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/TameCow.java	2009-01-20 22:31:23 UTC (rev 1133)
@@ -3,7 +3,7 @@
 import javax.webbeans.Realizes;
 
 @Realizes @Tame
-class TameCow extends Cow
+class TameCow extends AbstractCow
 {
    
 }




More information about the weld-commits mailing list