Author: dallen6
Date: 2009-03-11 10:31:35 -0400 (Wed, 11 Mar 2009)
New Revision: 1920
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/MockCreationalContext.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/ProducerMethodLifecycleTest.java
Log:
Fixed one broken test with producer methods
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/MockCreationalContext.java
(from rev 1909,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/MockCreationalContext.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/MockCreationalContext.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/MockCreationalContext.java 2009-03-11
14:31:35 UTC (rev 1920)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle;
+
+import javax.context.CreationalContext;
+
+public class MockCreationalContext<T> implements CreationalContext<T>
+{
+
+
+ public void push(T incompleteInstance)
+ {
+
+ }
+
+}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/ProducerMethodLifecycleTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/ProducerMethodLifecycleTest.java 2009-03-11
13:52:07 UTC (rev 1919)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/ProducerMethodLifecycleTest.java 2009-03-11
14:31:35 UTC (rev 1920)
@@ -67,14 +67,16 @@
assert false;
}
- @Test(groups = { "producerMethod", "broken" })
+ @Test(groups = { "producerMethod" })
@SpecAssertions({
@SpecAssertion(section = "3.4", id = "e"),
@SpecAssertion(section = "6.7", id = "k")
})
public void testProducerMethodReturnsNullIsDependent() throws Exception
{
- assert getCurrentManager().getInstanceByType(Spider.class, new
AnnotationLiteral<Null>() {}) == null;
+ Bean<Spider> spiderBean = getCurrentManager().resolveByType(Spider.class, new
AnnotationLiteral<Null>() {}).iterator().next();
+ CreationalContext<Spider> creationalContext = new
MockCreationalContext<Spider>();
+ assert spiderBean.create(creationalContext) == null;
}
@Test(groups = "producerMethod", expectedExceptions =
IllegalProductException.class)
Show replies by date