[webbeans-commits] Webbeans SVN: r2161 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection: enterprise and 1 other directory.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Mon Mar 23 21:34:51 EDT 2009
Author: shane.bryzak at jboss.com
Date: 2009-03-23 21:34:51 -0400 (Mon, 23 Mar 2009)
New Revision: 2161
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/DeluxeHenHouse.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/EnterpriseBeanInjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/Fox.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/HenHouse.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/HenHouseLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/MegaPoor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/MegaPoorBinding.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/MegaPoorHenHouse.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/PoorHenHouse.java
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/session/
Log:
consistent naming
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/DeluxeHenHouse.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/DeluxeHenHouse.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/DeluxeHenHouse.java 2009-03-24 01:34:51 UTC (rev 2161)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+ at Stateful
+public class DeluxeHenHouse extends HenHouse implements HenHouseLocal
+{
+ public Fox getFox()
+ {
+ return fox;
+ }
+
+ @Remove
+ public void remove()
+ {
+
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/EnterpriseBeanInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/EnterpriseBeanInjectionTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/EnterpriseBeanInjectionTest.java 2009-03-24 01:34:51 UTC (rev 2161)
@@ -0,0 +1,55 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.enterprise;
+
+import javax.inject.manager.Bean;
+
+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.testng.annotations.Test;
+
+/**
+ *
+ * Spec version: PRD2
+ */
+ at IntegrationTest
+ at Artifact
+ at Packaging(PackagingType.EAR)
+public class EnterpriseBeanInjectionTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertion(section = "4.2", id = "ab")
+ public void testFieldDeclaredInSessionBeanSuperclassInjected() throws Exception
+ {
+ new RunInDependentContext()
+ {
+ @Override
+ protected void execute() throws Exception
+ {
+ Bean<HenHouseLocal> bean = getCurrentManager().resolveByType(HenHouseLocal.class).iterator().next();
+ HenHouseLocal henHouse = getCurrentManager().getInstance(bean);
+ assert henHouse.getFox() != null;
+ assert henHouse.getFox().getName().equals("gavin");
+ }
+ }.run();
+ }
+
+ @Test
+ @SpecAssertion(section = "4.2", id = "ad")
+ public void testFieldDeclaredInSessionBeanIndirectSuperclassInjected() throws Exception
+ {
+ new RunInDependentContext()
+ {
+ @Override
+ protected void execute() throws Exception
+ {
+ Bean<HenHouseLocal> bean = getCurrentManager().resolveByType(HenHouseLocal.class, new MegaPoorBinding()).iterator().next();
+ HenHouseLocal henHouse = getCurrentManager().getInstance(bean);
+ assert henHouse.getFox() != null;
+ assert henHouse.getFox().getName().equals("gavin");
+ }
+ }.run();
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/Fox.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/Fox.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/Fox.java 2009-03-24 01:34:51 UTC (rev 2161)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.enterprise;
+
+import java.io.Serializable;
+
+import javax.context.Dependent;
+
+ at Dependent
+public class Fox implements Serializable
+{
+ public String getName()
+ {
+ return "gavin";
+ }
+}
\ No newline at end of file
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/HenHouse.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/HenHouse.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/HenHouse.java 2009-03-24 01:34:51 UTC (rev 2161)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.enterprise;
+
+import javax.inject.Current;
+
+class HenHouse
+{
+ @Current
+ public Fox fox;
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/HenHouseLocal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/HenHouseLocal.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/HenHouseLocal.java 2009-03-24 01:34:51 UTC (rev 2161)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.enterprise;
+
+import javax.ejb.Local;
+
+ at Local
+public interface HenHouseLocal
+{
+ Fox getFox();
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/MegaPoor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/MegaPoor.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/MegaPoor.java 2009-03-24 01:34:51 UTC (rev 2161)
@@ -0,0 +1,24 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.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.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+ at Target( { TYPE, METHOD, PARAMETER, FIELD })
+ at Retention(RUNTIME)
+ at Documented
+ at BindingType
+ at Inherited
+ at interface MegaPoor
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/MegaPoorBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/MegaPoorBinding.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/MegaPoorBinding.java 2009-03-24 01:34:51 UTC (rev 2161)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.enterprise;
+
+import javax.inject.AnnotationLiteral;
+
+class MegaPoorBinding extends AnnotationLiteral<MegaPoor> implements MegaPoor
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/MegaPoorHenHouse.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/MegaPoorHenHouse.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/MegaPoorHenHouse.java 2009-03-24 01:34:51 UTC (rev 2161)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+ at MegaPoor
+ at Stateful
+public class MegaPoorHenHouse extends PoorHenHouse implements HenHouseLocal
+{
+ public Fox getFox()
+ {
+ return fox;
+ }
+
+ @Remove
+ public void remove()
+ {
+
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/PoorHenHouse.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/PoorHenHouse.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/PoorHenHouse.java 2009-03-24 01:34:51 UTC (rev 2161)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.enterprise;
+
+class PoorHenHouse extends HenHouse
+{
+
+}
More information about the weld-commits
mailing list