Author: marius.bogoevici
Date: 2009-10-14 04:16:59 -0400 (Wed, 14 Oct 2009)
New Revision: 4028
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/sameClassListedTwiceInBeansXml/Transactional.java
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
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/broken/sameClassListedTwiceInBeansXml/FordInterceptor.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/Deadly.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/Fast.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/FastAndDeadlyMissile.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/MultipleInterceptorBindingsTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/Slow.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/SlowMissile.java
Log:
Fixing and enabling tests.
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java 2009-10-14
07:26:33 UTC (rev 4027)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java 2009-10-14
08:16:59 UTC (rev 4028)
@@ -398,7 +398,7 @@
assert InteriorDecorator.isDestroyed();
}
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertion(section = "6.4.1", id = "aa")
public void testDependentScopedInterceptorsAreDependentObjectsOfBean()
{
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-14
07:26:33 UTC (rev 4027)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java 2009-10-14
08:16:59 UTC (rev 4028)
@@ -166,7 +166,7 @@
assert
interceptors.get(1).getInterceptorBindingTypes().contains(transactionalBinding);
}
- @Test(groups = "ri-broken", expectedExceptions =
{IllegalArgumentException.class})
+ @Test(expectedExceptions = {IllegalArgumentException.class})
@SpecAssertions({
@SpecAssertion(section = "11.3.12", id = "b")
})
@@ -179,7 +179,7 @@
getCurrentManager().resolveInterceptors(InterceptionType.AROUND_INVOKE,
transactionalBinding, transactionalBinding);
}
- @Test(groups = "ri-broken", expectedExceptions =
{IllegalArgumentException.class})
+ @Test(expectedExceptions = {IllegalArgumentException.class})
@SpecAssertions({
@SpecAssertion(section = "11.3.12", id = "c")
})
@@ -189,7 +189,7 @@
getCurrentManager().resolveInterceptors(InterceptionType.AROUND_INVOKE);
}
- @Test(groups = "ri-broken", expectedExceptions =
{IllegalArgumentException.class})
+ @Test(expectedExceptions = {IllegalArgumentException.class})
@SpecAssertions({
@SpecAssertion(section = "11.3.12", id = "d")
})
@@ -229,7 +229,7 @@
assert !MissileInterceptor.intercepted;
}
- @Test (groups = "ri-broken")
+ @Test
@SpecAssertion(section = "7.2", id = "ia")
public void testProducerMethodsAreIntercepted()
{
@@ -277,7 +277,7 @@
assert NetworkLogger.intercepted;
}
- @Test (groups = "ri-broken")
+ @Test
@SpecAssertions({
@SpecAssertion(section = "9.1.1", id = "a"),
@SpecAssertion(section = "9.1.1", id = "b")
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/sameClassListedTwiceInBeansXml/FordInterceptor.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/sameClassListedTwiceInBeansXml/FordInterceptor.java 2009-10-14
07:26:33 UTC (rev 4027)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/sameClassListedTwiceInBeansXml/FordInterceptor.java 2009-10-14
08:16:59 UTC (rev 4028)
@@ -2,7 +2,9 @@
import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;
+import javax.interceptor.Interceptor;
+@Interceptor @Transactional
class FordInterceptor
{
@AroundInvoke public Object alwaysReturnThis(InvocationContext ctx) throws Exception
Copied:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/sameClassListedTwiceInBeansXml/Transactional.java
(from rev 4022,
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/invalidLifecycleInterceptor/Transactional.java)
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/sameClassListedTwiceInBeansXml/Transactional.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/sameClassListedTwiceInBeansXml/Transactional.java 2009-10-14
08:16:59 UTC (rev 4028)
@@ -0,0 +1,20 @@
+package
org.jboss.jsr299.tck.tests.interceptors.definition.broken.sameClassListedTwiceInBeansXml;
+
+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.interceptor.InterceptorBinding;
+
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+@Documented
+@InterceptorBinding
+@interface Transactional
+{
+
+}
\ No newline at end of file
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/Deadly.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/Deadly.java 2009-10-14
07:26:33 UTC (rev 4027)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/Deadly.java 2009-10-14
08:16:59 UTC (rev 4028)
@@ -11,12 +11,13 @@
import java.lang.annotation.Target;
import javax.inject.Qualifier;
+import javax.interceptor.InterceptorBinding;
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Target( { TYPE, METHOD})
@Retention(RUNTIME)
@Documented
-@Qualifier
-@interface Deadly
+@InterceptorBinding
+public @interface Deadly
{
}
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/Fast.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/Fast.java 2009-10-14
07:26:33 UTC (rev 4027)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/Fast.java 2009-10-14
08:16:59 UTC (rev 4028)
@@ -11,12 +11,13 @@
import java.lang.annotation.Target;
import javax.inject.Qualifier;
+import javax.interceptor.InterceptorBinding;
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Target( { TYPE, METHOD})
@Retention(RUNTIME)
@Documented
-@Qualifier
-@interface Fast
+@InterceptorBinding
+public @interface Fast
{
}
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/FastAndDeadlyMissile.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/FastAndDeadlyMissile.java 2009-10-14
07:26:33 UTC (rev 4027)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/FastAndDeadlyMissile.java 2009-10-14
08:16:59 UTC (rev 4028)
@@ -1,8 +1,6 @@
package org.jboss.jsr299.tck.tests.interceptors.definition.multipleBindings;
-import javax.interceptor.Interceptors;
-(a)Interceptors(MissileInterceptor.class)
@Fast @Deadly
class FastAndDeadlyMissile implements Missile
{
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/MultipleInterceptorBindingsTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/MultipleInterceptorBindingsTest.java 2009-10-14
07:26:33 UTC (rev 4027)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/MultipleInterceptorBindingsTest.java 2009-10-14
08:16:59 UTC (rev 4028)
@@ -15,7 +15,7 @@
@BeansXml("beans.xml")
public class MultipleInterceptorBindingsTest extends AbstractJSR299Test
{
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertions({
@SpecAssertion(section = "9.5.1", id = "a"),
@SpecAssertion(section = "9.5", id = "ca")
@@ -24,21 +24,19 @@
{
MissileInterceptor.intercepted = false;
- Missile missile = getInstanceByType(Missile.class,
- new AnnotationLiteral<Fast>() {}, new AnnotationLiteral<Deadly>()
{});
+ Missile missile = getInstanceByType(FastAndDeadlyMissile.class);
missile.fire();
assert MissileInterceptor.intercepted;
}
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertion(section = "9.5.1", id = "b")
public void testInterceptorNotAppliedToBeanWithSomeBindings()
{
MissileInterceptor.intercepted = false;
- Missile missile = getInstanceByType(Missile.class,
- new AnnotationLiteral<Slow>() {}, new AnnotationLiteral<Deadly>()
{});
+ Missile missile = getInstanceByType(SlowMissile.class);
missile.fire();
assert !MissileInterceptor.intercepted;
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/Slow.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/Slow.java 2009-10-14
07:26:33 UTC (rev 4027)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/Slow.java 2009-10-14
08:16:59 UTC (rev 4028)
@@ -1,22 +1,21 @@
package org.jboss.jsr299.tck.tests.interceptors.definition.multipleBindings;
+import java.lang.annotation.Documented;
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 static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Target;
-import javax.inject.Qualifier;
+import javax.interceptor.InterceptorBinding;
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Target( { TYPE, METHOD})
@Retention(RUNTIME)
@Documented
-@Qualifier
-@interface Slow
+@InterceptorBinding
+public @interface Slow
{
}
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/SlowMissile.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/SlowMissile.java 2009-10-14
07:26:33 UTC (rev 4027)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/SlowMissile.java 2009-10-14
08:16:59 UTC (rev 4028)
@@ -1,8 +1,6 @@
package org.jboss.jsr299.tck.tests.interceptors.definition.multipleBindings;
-import javax.interceptor.Interceptors;
-(a)Interceptors(MissileInterceptor.class)
@Slow @Deadly
class SlowMissile implements Missile
{