[webbeans-commits] Webbeans SVN: r3490 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Fri Aug 14 00:44:43 EDT 2009
Author: shane.bryzak at jboss.com
Date: 2009-08-14 00:44:42 -0400 (Fri, 14 Aug 2009)
New Revision: 3490
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/LightYellowPearTree.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/LightYellowPearTreeLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/Pear.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/PearTree.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/PearTreeLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/YellowPearTree.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/EnterpriseProducerMethodDefinitionTest.java
Log:
enterprise producer method/specialization tests
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/EnterpriseProducerMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/EnterpriseProducerMethodDefinitionTest.java 2009-08-14 04:16:16 UTC (rev 3489)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/EnterpriseProducerMethodDefinitionTest.java 2009-08-14 04:44:42 UTC (rev 3490)
@@ -34,5 +34,13 @@
assert getBeans(Apple.class, new AnnotationLiteral<Yummy>() {}).size() == 1;
assert getInstanceByType(Apple.class,new AnnotationLiteral<Yummy>() {}).getTree().getClass().equals(AppleTree.class);
}
+
+ @Test
+ @SpecAssertion(section = "4.2", id = "dj")
+ public void testNonStaticProducerMethodNotIndirectlyInherited()
+ {
+ assert getBeans(Pear.class, new AnnotationLiteral<Yummy>() {}).size() == 1;
+ assert getInstanceByType(Pear.class,new AnnotationLiteral<Yummy>() {}).getColour().equals("green");
+ }
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/LightYellowPearTree.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/LightYellowPearTree.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/LightYellowPearTree.java 2009-08-14 04:44:42 UTC (rev 3490)
@@ -0,0 +1,13 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.method.definition.enterprise;
+
+import javax.ejb.Stateful;
+import javax.enterprise.inject.Produces;
+
+ at Stateful
+public class LightYellowPearTree extends YellowPearTree implements LightYellowPearTreeLocal
+{
+ @Produces @Yummy public Pear producePear()
+ {
+ return new Pear("lightYellow");
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/LightYellowPearTreeLocal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/LightYellowPearTreeLocal.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/LightYellowPearTreeLocal.java 2009-08-14 04:44:42 UTC (rev 3490)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.method.definition.enterprise;
+
+import javax.ejb.Local;
+
+ at Local
+public interface LightYellowPearTreeLocal extends PearTreeLocal
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/Pear.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/Pear.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/Pear.java 2009-08-14 04:44:42 UTC (rev 3490)
@@ -0,0 +1,16 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.method.definition.enterprise;
+
+public class Pear
+{
+ private String colour;
+
+ public Pear(String colour)
+ {
+ this.colour = colour;
+ }
+
+ public String getColour()
+ {
+ return colour;
+ }
+}
\ No newline at end of file
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/PearTree.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/PearTree.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/PearTree.java 2009-08-14 04:44:42 UTC (rev 3490)
@@ -0,0 +1,13 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.method.definition.enterprise;
+
+import javax.ejb.Stateful;
+import javax.enterprise.inject.Produces;
+
+ at Stateful
+public class PearTree implements PearTreeLocal
+{
+ @Produces @Yummy public Pear producePear()
+ {
+ return new Pear("green");
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/PearTreeLocal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/PearTreeLocal.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/PearTreeLocal.java 2009-08-14 04:44:42 UTC (rev 3490)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.method.definition.enterprise;
+
+import javax.ejb.Local;
+
+ at Local
+public interface PearTreeLocal
+{
+ Pear producePear();
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/YellowPearTree.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/YellowPearTree.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/YellowPearTree.java 2009-08-14 04:44:42 UTC (rev 3490)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.method.definition.enterprise;
+
+class YellowPearTree extends PearTree
+{
+
+}
More information about the weld-commits
mailing list