[webbeans-commits] Webbeans SVN: r3473 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/definition/scope and 2 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Thu Aug 13 00:31:57 EDT 2009


Author: shane.bryzak at jboss.com
Date: 2009-08-13 00:31:57 -0400 (Thu, 13 Aug 2009)
New Revision: 3473

Added:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/TameSkinnyHairlessCat.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/TameSkinnyHairlessCatLocal.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/Clydesdale.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/MiniatureClydesdale.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/Barracuda.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/BarracudaLocal.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/Fish.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/FishStereotype.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/TameBarracuda.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/TameBarracudaLocal.java
Modified:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/EnterpriseBindingDefinitionTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/ScopeDefinitionTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/EnterpriseStereotypeDefinitionTest.java
   tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
more section 4.1 cleanup, removed duplicate assertions, added missing tests


Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/EnterpriseBindingDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/EnterpriseBindingDefinitionTest.java	2009-08-13 02:58:21 UTC (rev 3472)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/EnterpriseBindingDefinitionTest.java	2009-08-13 04:31:57 UTC (rev 3473)
@@ -51,4 +51,13 @@
       Set<? extends Annotation> bindings = getBeans(EnglishBorderCollieLocal.class, new HairyBinding(false)).iterator().next().getBindings();
       assert annotationSetMatches(bindings, Any.class, Hairy.class);
    }
+   
+   @Test
+   @SpecAssertion(section = "4.1", id = "apa")
+   public void testBindingNotDeclaredInheritedIsNotIndirectlyInherited()
+   {
+      Set<? extends Annotation> bindings = getBeans(TameSkinnyHairlessCatLocal.class).iterator().next().getBindings();
+      assert annotationSetMatches(bindings, Any.class);            
+      assert getBeans(TameSkinnyHairlessCatLocal.class, new HairlessBinding()).size() == 0;            
+   }
 }

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/TameSkinnyHairlessCat.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/TameSkinnyHairlessCat.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/TameSkinnyHairlessCat.java	2009-08-13 04:31:57 UTC (rev 3473)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.definition.binding.enterprise;
+
+public class TameSkinnyHairlessCat extends SkinnyHairlessCat implements TameSkinnyHairlessCatLocal
+{
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/TameSkinnyHairlessCatLocal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/TameSkinnyHairlessCatLocal.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/TameSkinnyHairlessCatLocal.java	2009-08-13 04:31:57 UTC (rev 3473)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.definition.binding.enterprise;
+
+import javax.ejb.Local;
+
+ at Local
+public interface TameSkinnyHairlessCatLocal
+{
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/Clydesdale.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/Clydesdale.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/Clydesdale.java	2009-08-13 04:31:57 UTC (rev 3473)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.definition.scope;
+
+class Clydesdale extends Horse
+{
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/MiniatureClydesdale.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/MiniatureClydesdale.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/MiniatureClydesdale.java	2009-08-13 04:31:57 UTC (rev 3473)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.definition.scope;
+
+class MiniatureClydesdale extends Clydesdale
+{
+
+}

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/ScopeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/ScopeDefinitionTest.java	2009-08-13 02:58:21 UTC (rev 3472)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/ScopeDefinitionTest.java	2009-08-13 04:31:57 UTC (rev 3473)
@@ -115,7 +115,7 @@
       assert getBeans(BorderCollie.class).iterator().next().getScopeType().equals(RequestScoped.class);
    }
    
-   @Test @SpecAssertion(section="4.1", id = "ba")
+   @Test @SpecAssertion(section="4.1", id = "baa")
    public void testScopeTypeNotDeclaredInheritedIsNotInherited()
    {
       assert getBeans(ShetlandPony.class).size() == 1; 
@@ -142,4 +142,12 @@
       assert getBeans(EnglishBorderCollie.class).iterator().next().getScopeType().equals(RequestScoped.class);
    }
    
+   @Test 
+   @SpecAssertion(section="4.1", id = "bca")
+   public void testScopeTypeNotDeclaredInheritedIsNotIndirectlyInherited()
+   {
+      assert getBeans(MiniatureClydesdale.class).size() == 1; 
+      assert getBeans(MiniatureClydesdale.class).iterator().next().getScopeType().equals(Dependent.class);
+   }
+   
 }
\ No newline at end of file

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/Barracuda.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/Barracuda.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/Barracuda.java	2009-08-13 04:31:57 UTC (rev 3473)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.definition.stereotype.enterprise;
+
+import javax.ejb.Stateful;
+
+ at Stateful
+public class Barracuda extends Fish implements BarracudaLocal
+{
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/BarracudaLocal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/BarracudaLocal.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/BarracudaLocal.java	2009-08-13 04:31:57 UTC (rev 3473)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.definition.stereotype.enterprise;
+
+import javax.ejb.Local;
+
+ at Local
+public interface BarracudaLocal
+{
+
+}

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/EnterpriseStereotypeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/EnterpriseStereotypeDefinitionTest.java	2009-08-13 02:58:21 UTC (rev 3472)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/EnterpriseStereotypeDefinitionTest.java	2009-08-13 04:31:57 UTC (rev 3473)
@@ -26,6 +26,13 @@
    }
    
    @Test
+   @SpecAssertion(section = "4.1", id = "ama")
+   public void testStereotypeNotDeclaredInheritedIsNotInherited() throws Exception
+   {
+      assert !getBeans(BarracudaLocal.class).iterator().next().getScopeType().equals(RequestScoped.class);
+   }
+   
+   @Test
    @SpecAssertion(section = "4.1", id = "aq")
    public void testStereotypeDeclaredInheritedIsIndirectlyInherited()
    {
@@ -33,6 +40,13 @@
    }
    
    @Test
+   @SpecAssertion(section = "4.1", id = "aqa")
+   public void testStereotypeNotDeclaredInheritedIsNotIndirectlyInherited()
+   {
+      assert !getBeans(TameBarracudaLocal.class).iterator().next().getScopeType().equals(RequestScoped.class);
+   }
+   
+   @Test
    @SpecAssertion(section = "4.1", id = "hhj")
    public void testStereotypeScopeIsOverriddenByInheritedScope()
    {

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/Fish.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/Fish.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/Fish.java	2009-08-13 04:31:57 UTC (rev 3473)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.definition.stereotype.enterprise;
+
+ at FishStereotype
+class Fish
+{
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/FishStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/FishStereotype.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/FishStereotype.java	2009-08-13 04:31:57 UTC (rev 3473)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.definition.stereotype.enterprise;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.stereotype.Stereotype;
+
+ at Stereotype
+ at Target( { TYPE, METHOD, FIELD })
+ at Retention(RUNTIME)
+ at RequestScoped
+ at interface FishStereotype
+{
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/TameBarracuda.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/TameBarracuda.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/TameBarracuda.java	2009-08-13 04:31:57 UTC (rev 3473)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.definition.stereotype.enterprise;
+
+import javax.ejb.Stateful;
+
+ at Stateful
+public class TameBarracuda extends Barracuda implements TameBarracudaLocal
+{
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/TameBarracudaLocal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/TameBarracudaLocal.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/TameBarracudaLocal.java	2009-08-13 04:31:57 UTC (rev 3473)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.definition.stereotype.enterprise;
+
+import javax.ejb.Local;
+
+ at Local
+public interface TameBarracudaLocal
+{
+
+}

Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml	2009-08-13 02:58:21 UTC (rev 3472)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml	2009-08-13 04:31:57 UTC (rev 3473)
@@ -1487,39 +1487,43 @@
         <text>Test interceptor binding type for indirectly extended session bean not annotated |@Inherited| is not inherited.</text>
       </assertion>      
     </group>
+
+    <group>
+      <text>Suppose a class X is extended directly or indirectly by the bean class of a managed bean or session bean Y.  If X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the |@Inherited| meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.</text>
+      
+      <assertion id="ba">
+        <text>Test scope type for directly extended managed bean annotated |@Inherited| is inherited.</text>
+      </assertion>
+      
+      <assertion id="baa">
+        <text>Test scope type for directly extended managed bean not annotated |@Inherited| is not inherited.</text>
+      </assertion>      
 
-    <assertion id="ba">
-      <text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X is annotated with a _scope type_ Z then Y inherits the annotation if and only if Z declares the |@Inherited| meta-annotation and Y does not declare a scope type.</text>
-    </assertion>
+      <assertion id="bc">
+        <text>Test scope type for indirectly extended managed bean annotated |@Inherited| is inherited.</text>
+      </assertion>
+
+      <assertion id="bca">
+        <text>Test scope type for indirectly extended managed bean not annotated |@Inherited| is not inherited.</text>
+      </assertion>
+      
+      <assertion id="be">
+        <text>Test scope type for directly extended session bean annotated |@Inherited| is inherited.</text>      
+      </assertion>
+      
+      <assertion id="bea">
+        <text>Test scope type for directly extended session bean not annotated |@Inherited| is not inherited.</text>
+      </assertion>      
 
-    <assertion id="bb">
-      <text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X is annotated with a _scope type_ Z then Y inherits the annotation if and only if Z declares the |@Inherited| meta-annotation and Y does not declare a scope type.</text>
-    </assertion>
+      <assertion id="bh">
+        <text>Test scope type for indirectly extended session bean annotated |@Inherited| is inherited.</text>
+      </assertion>
+      
+      <assertion id="bha">
+        <text>Test scope type for indirectly extended session bean not annotated |@Inherited| is not inherited.</text>
+      </assertion>      
+    </group>
 
-    <assertion id="bc">
-      <text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X is annotated with a _scope type_ Z then Y inherits the annotation if and only if Z declares the |@Inherited| meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.</text>
-    </assertion>
-
-    <assertion id="bd">
-      <text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X is annotated with a _scope type_ Z then Y inherits the annotation if and only if Z declares the |@Inherited| meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.</text>
-    </assertion>
-    
-    <assertion id="be">
-      <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X is annotated with a _scope type_ Z then Y inherits the annotation if and only if Z declares the |@Inherited| meta-annotation and Y does not declare a scope type.</text>
-    </assertion>
-
-    <assertion id="bf">
-      <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X is annotated with a _scope type_ Z then Y inherits the annotation if and only if Z declares the |@Inherited| meta-annotation and Y does not declare a scope type.</text>
-    </assertion>
-
-    <assertion id="bg">
-      <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X is annotated with a _scope type_ Z then Y inherits the annotation if and only if Z declares the |@Inherited| meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.</text>
-    </assertion>
-
-    <assertion id="bh">
-      <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X is annotated with a _scope type_ Z then Y inherits the annotation if and only if Z declares the |@Inherited| meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.</text>
-    </assertion>
-
     <assertion id="hhh">
       <text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, a scope type explicitly declared by X and inherited by Y from X takes precedence over default scopes of stereotypes declared or inherited by Y.</text>
     </assertion>




More information about the weld-commits mailing list