Author: shane.bryzak(a)jboss.com
Date: 2009-03-18 05:30:58 -0400 (Wed, 18 Mar 2009)
New Revision: 2083
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/IndirectOrderProcessor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/IntermediateOrderProcessor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/MegaPoorHenHouse.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/PoorHenHouse.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/session/SessionBeanInjectionTest.java
Log:
inheritance tests
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java 2009-03-18
08:27:05 UTC (rev 2082)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java 2009-03-18
09:30:58 UTC (rev 2083)
@@ -200,6 +200,7 @@
@SpecAssertion(section = "4.2", id = "da")
public void testNonStaticProducerMethodNotInherited()
{
+ // TODO - does this even test the assertion correctly? where is class Y?
assert getCurrentManager().resolveByType(Egg.class, new
AnnotationLiteral<Yummy>() {}).size() == 1;
System.out.println(getCurrentManager().getInstanceByType(Egg.class, new
AnnotationLiteral<Yummy>() {}).getMother().getClass());
assert getCurrentManager().getInstanceByType(Egg.class, new
AnnotationLiteral<Yummy>() {}).getMother().getClass().equals(Chicken.class);
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/IndirectOrderProcessor.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/IndirectOrderProcessor.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/IndirectOrderProcessor.java 2009-03-18
09:30:58 UTC (rev 2083)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.lifecycle;
+
+class IndirectOrderProcessor extends IntermediateOrderProcessor
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/IntermediateOrderProcessor.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/IntermediateOrderProcessor.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/IntermediateOrderProcessor.java 2009-03-18
09:30:58 UTC (rev 2083)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.lifecycle;
+
+class IntermediateOrderProcessor extends OrderProcessor
+{
+
+}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java 2009-03-18
08:27:05 UTC (rev 2082)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java 2009-03-18
09:30:58 UTC (rev 2083)
@@ -165,6 +165,23 @@
}.run();
assert OrderProcessor.postConstructCalled;
}
+
+ @Test
+ @SpecAssertion(section = "4.2", id = "bac")
+ public void testIndirectSubClassInheritsPostConstructOnSuperclass() throws Exception
+ {
+ OrderProcessor.postConstructCalled = false;
+ assert getCurrentManager().resolveByType(IndirectOrderProcessor.class).size() ==
1;
+ new RunInDependentContext()
+ {
+ @Override
+ protected void execute() throws Exception
+ {
+ getCurrentManager().getInstanceByType(IndirectOrderProcessor.class).order();
+ }
+ }.run();
+ assert OrderProcessor.postConstructCalled;
+ }
@Test
@SpecAssertion(section = "4.2", id = "bba")
@@ -184,6 +201,25 @@
}.run();
assert OrderProcessor.preDestroyCalled;
}
+
+ @Test
+ @SpecAssertion(section = "4.2", id = "bbc")
+ public void testIndirectSubClassInheritsPreDestroyOnSuperclass() throws Exception
+ {
+ OrderProcessor.preDestroyCalled = false;
+ assert getCurrentManager().resolveByType(IndirectOrderProcessor.class).size() ==
1;
+ new RunInDependentContext()
+ {
+ @Override
+ protected void execute() throws Exception
+ {
+ Bean<IndirectOrderProcessor> bean =
getCurrentManager().resolveByType(IndirectOrderProcessor.class).iterator().next();
+ IndirectOrderProcessor instance =
getCurrentManager().getInstanceByType(IndirectOrderProcessor.class);
+ bean.destroy(instance);
+ }
+ }.run();
+ assert OrderProcessor.preDestroyCalled;
+ }
@Test
@SpecAssertion(section = "4.2", id = "baa")
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java 2009-03-18
08:27:05 UTC (rev 2082)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java 2009-03-18
09:30:58 UTC (rev 2083)
@@ -29,7 +29,7 @@
}
@Test
- @SpecAssertion(section="unknown", id="unknown")
+ @SpecAssertion(section="5.10", id="c")
public void testQualifiedNameLookup()
{
assert
getCurrentConfiguration().getEl().evaluateValueExpression("#{javax.context.conversation}",
Conversation.class) != null;
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java 2009-03-18
08:27:05 UTC (rev 2082)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java 2009-03-18
09:30:58 UTC (rev 2083)
@@ -64,6 +64,22 @@
}
}.run();
}
+
+ @Test
+ @SpecAssertion(section="4.2", id = "ac")
+ public void testFieldDeclaredInIndirectSuperclassInjected() throws Exception
+ {
+ new RunInDependentContext()
+ {
+ @Override
+ protected void execute() throws Exception
+ {
+ MegaPoorHenHouse henHouse =
getCurrentManager().getInstanceByType(MegaPoorHenHouse.class);
+ assert henHouse.fox != null;
+ assert henHouse.fox.getName().equals("gavin");
+ }
+ }.run();
+ }
@Test(groups = { "stub", "injection", "webbeansxml" })
@SpecAssertion(section = "3.8.2", id = "a")
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/MegaPoorHenHouse.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/MegaPoorHenHouse.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/MegaPoorHenHouse.java 2009-03-18
09:30:58 UTC (rev 2083)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.lookup.injection;
+
+public class MegaPoorHenHouse extends PoorHenHouse
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/PoorHenHouse.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/PoorHenHouse.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/PoorHenHouse.java 2009-03-18
09:30:58 UTC (rev 2083)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.lookup.injection;
+
+public class PoorHenHouse extends HenHouse
+{
+
+}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/session/SessionBeanInjectionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/session/SessionBeanInjectionTest.java 2009-03-18
08:27:05 UTC (rev 2082)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/session/SessionBeanInjectionTest.java 2009-03-18
09:30:58 UTC (rev 2083)
@@ -5,6 +5,7 @@
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;
@@ -13,11 +14,12 @@
*
* Spec version: PRD2
*/
+@IntegrationTest
@Artifact
@Packaging(PackagingType.EAR)
public class SessionBeanInjectionTest extends AbstractJSR299Test
{
- @Test(groups = "broken")
+ @Test//(groups = "broken")
@SpecAssertion(section = "4.2", id = "ab")
public void testFieldDeclaredInSessionBeanSuperclassInjected() throws Exception
{
Show replies by date