Author: jharting
Date: 2009-10-21 10:36:55 -0400 (Wed, 21 Oct 2009)
New Revision: 4210
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/Warhead.java
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/Missile.java
Log:
Extended interceptor definition test to test WELD-219
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java 2009-10-21
04:43:21 UTC (rev 4209)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java 2009-10-21
14:36:55 UTC (rev 4210)
@@ -202,20 +202,22 @@
getCurrentManager().resolveInterceptors(InterceptionType.AROUND_INVOKE,
nonBinding);
}
- @Test
+ @Test(groups = "ri-broken")
@SpecAssertions({
@SpecAssertion(section = "7.2", id = "a"),
@SpecAssertion(section = "9.2", id = "a"),
@SpecAssertion(section = "12.3", id = "kb")
})
+ //WELD-219
public void testManagedBeanIsIntercepted()
{
MissileInterceptor.intercepted = false;
Missile missile = getInstanceByType(Missile.class);
missile.fire();
-
assert MissileInterceptor.intercepted;
+
+ assert missile.getWarhead() != null; // test that injection works
}
@Test
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/Missile.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/Missile.java 2009-10-21
04:43:21 UTC (rev 4209)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/Missile.java 2009-10-21
14:36:55 UTC (rev 4210)
@@ -5,6 +5,9 @@
@MissileBinding
class Missile
{
+ @Inject
+ private Warhead warhead;
+
boolean initCalled = false;
@Inject
@@ -17,4 +20,9 @@
}
public void fire() { }
+
+ public Warhead getWarhead()
+ {
+ return warhead;
+ }
}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/Warhead.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/Warhead.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/Warhead.java 2009-10-21
14:36:55 UTC (rev 4210)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.interceptors.definition;
+
+class Warhead
+{
+
+}