Author: shane.bryzak(a)jboss.com
Date: 2009-03-25 23:08:41 -0400 (Wed, 25 Mar 2009)
New Revision: 2209
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/LameInfertileChicken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/AnotherDeploymentType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/Chicken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/ChickenLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/Egg.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/EnterpriseProducerFieldDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/Foo.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/InfertileChicken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/InfertileChickenLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/LameInfertileChicken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/LameInfertileChickenLocal.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/beans.xml
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java
Log:
tests for 4.2.eb, 4.2.ed
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/LameInfertileChicken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/LameInfertileChicken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/LameInfertileChicken.java 2009-03-26
03:08:41 UTC (rev 2209)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.field.definition;
+
+@AnotherDeploymentType
+class LameInfertileChicken extends InfertileChicken
+{
+
+}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java 2009-03-26
02:53:57 UTC (rev 2208)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java 2009-03-26
03:08:41 UTC (rev 2209)
@@ -219,4 +219,11 @@
{
assert !(getCurrentManager().getInstanceByType(Egg.class, FOO_LITERAL).getMother()
instanceof InfertileChicken);
}
+
+ @Test(groups = "producerField")
+ @SpecAssertion(section = "4.2", id = "ec")
+ public void testNonStaticProducerFieldNotIndirectlyInherited()
+ {
+ assert !(getCurrentManager().getInstanceByType(Egg.class, FOO_LITERAL).getMother()
instanceof LameInfertileChicken);
+ }
}
\ No newline at end of file
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/AnotherDeploymentType.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/AnotherDeploymentType.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/AnotherDeploymentType.java 2009-03-26
03:08:41 UTC (rev 2209)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.field.definition.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.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.DeploymentType;
+
+@Target( { TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+@Documented
+@DeploymentType
+@interface AnotherDeploymentType
+{
+
+}
\ No newline at end of file
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/Chicken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/Chicken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/Chicken.java 2009-03-26
03:08:41 UTC (rev 2209)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.field.definition.enterprise;
+
+import javax.ejb.Stateful;
+import javax.inject.Produces;
+
+@Stateful
+public class Chicken implements ChickenLocal
+{
+ @Produces @Foo
+ private Egg egg = new Egg(this);
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/ChickenLocal.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/ChickenLocal.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/ChickenLocal.java 2009-03-26
03:08:41 UTC (rev 2209)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.field.definition.enterprise;
+
+import javax.ejb.Local;
+
+@Local
+public interface ChickenLocal
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/Egg.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/Egg.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/Egg.java 2009-03-26
03:08:41 UTC (rev 2209)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.field.definition.enterprise;
+
+public class Egg
+{
+
+ private final Chicken mother;
+
+ public Egg(Chicken mother)
+ {
+ super();
+ this.mother = mother;
+ }
+
+ public Chicken getMother()
+ {
+ return mother;
+ }
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/EnterpriseProducerFieldDefinitionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/EnterpriseProducerFieldDefinitionTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/EnterpriseProducerFieldDefinitionTest.java 2009-03-26
03:08:41 UTC (rev 2209)
@@ -0,0 +1,37 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.field.definition.enterprise;
+
+import java.lang.annotation.Annotation;
+
+import javax.inject.AnnotationLiteral;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+@Artifact
+@IntegrationTest
+(a)Packaging(PackagingType.EAR)
+(a)BeansXml("beans.xml")
+public class EnterpriseProducerFieldDefinitionTest extends AbstractJSR299Test
+{
+ private static final Annotation FOO_LITERAL = new AnnotationLiteral<Foo>() {};
+
+ @Test(groups = {"producerField", "ri-broken"})
+ @SpecAssertion(section = "4.2", id = "eb")
+ public void testNonStaticProducerFieldNotInherited()
+ {
+ assert !(getCurrentManager().getInstanceByType(Egg.class, FOO_LITERAL).getMother()
instanceof InfertileChicken);
+ }
+
+ @Test(groups = {"producerField", "ri-broken"})
+ @SpecAssertion(section = "4.2", id = "ed")
+ public void testNonStaticProducerFieldNotIndirectlyInherited()
+ {
+ assert !(getCurrentManager().getInstanceByType(Egg.class, FOO_LITERAL).getMother()
instanceof LameInfertileChicken);
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/Foo.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/Foo.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/Foo.java 2009-03-26
03:08:41 UTC (rev 2209)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.field.definition.enterprise;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Foo
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/InfertileChicken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/InfertileChicken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/InfertileChicken.java 2009-03-26
03:08:41 UTC (rev 2209)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.field.definition.enterprise;
+
+@AnotherDeploymentType
+public class InfertileChicken extends Chicken implements InfertileChickenLocal
+{
+
+}
\ No newline at end of file
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/InfertileChickenLocal.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/InfertileChickenLocal.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/InfertileChickenLocal.java 2009-03-26
03:08:41 UTC (rev 2209)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.field.definition.enterprise;
+
+import javax.ejb.Local;
+
+@Local
+public interface InfertileChickenLocal
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/LameInfertileChicken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/LameInfertileChicken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/LameInfertileChicken.java 2009-03-26
03:08:41 UTC (rev 2209)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.field.definition.enterprise;
+
+import javax.ejb.Stateful;
+
+@Stateful
+public class LameInfertileChicken extends InfertileChicken implements
LameInfertileChickenLocal
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/LameInfertileChickenLocal.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/LameInfertileChickenLocal.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/LameInfertileChickenLocal.java 2009-03-26
03:08:41 UTC (rev 2209)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.field.definition.enterprise;
+
+import javax.ejb.Local;
+
+@Local
+public interface LameInfertileChickenLocal
+{
+
+}
Added:
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/beans.xml
===================================================================
---
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/beans.xml
(rev 0)
+++
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/enterprise/beans.xml 2009-03-26
03:08:41 UTC (rev 2209)
@@ -0,0 +1,8 @@
+<Beans xmlns="urn:java:ee"
+
xmlns:test="urn:java:org.jboss.jsr299.tck.tests.implementation.producer.field.definition.enterprise">
+ <Deploy>
+ <Standard />
+ <Production />
+ <test:AnotherDeploymentType />
+ </Deploy>
+</Beans>
Show replies by date