Author: marius.bogoevici
Date: 2009-10-14 03:19:49 -0400 (Wed, 14 Oct 2009)
New Revision: 4026
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/Secure.java
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorCanNotBeDecorator/InterceptorCanNotBeDecoratorTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorWithNoBinding/InterceptorWithNoBindingTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/invalidBindingAnnotations/FooStereotype.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/invalidBindingAnnotations/InvalidInterceptorBindingAnnotationsTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/sameClassListedTwiceInBeansXml/SameClassListedTwiceInBeansXmlTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorNotListedInBeansXml/Transactional.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/AnotherInterceptor.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/FirstInterceptor.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/Foo.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/InterceptorOrderTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/SecondInterceptor.java
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/beans.xml
Log:
Corrections to make the tests compliant with the specification. Enabling tests.
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorCanNotBeDecorator/InterceptorCanNotBeDecoratorTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorCanNotBeDecorator/InterceptorCanNotBeDecoratorTest.java 2009-10-14
05:37:42 UTC (rev 4025)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorCanNotBeDecorator/InterceptorCanNotBeDecoratorTest.java 2009-10-14
07:19:49 UTC (rev 4026)
@@ -15,7 +15,7 @@
@BeansXml("beans.xml")
public class InterceptorCanNotBeDecoratorTest extends AbstractJSR299Test
{
- @Test(groups = { "ri-broken" })
+ @Test
@SpecAssertion(section = "3.1", id = "f0")
public void testInterceptorCanNotAlsoBeDecorator() throws Exception
{
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorWithNoBinding/InterceptorWithNoBindingTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorWithNoBinding/InterceptorWithNoBindingTest.java 2009-10-14
05:37:42 UTC (rev 4025)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorWithNoBinding/InterceptorWithNoBindingTest.java 2009-10-14
07:19:49 UTC (rev 4026)
@@ -17,10 +17,10 @@
@SpecVersion(spec="cdi", version="PFD2")
public class InterceptorWithNoBindingTest extends AbstractJSR299Test
{
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertion(section = "9.2", id = "c")
public void testInterceptorWithNoBindingNotOk()
{
-
+ assert false;
}
}
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/invalidBindingAnnotations/FooStereotype.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/invalidBindingAnnotations/FooStereotype.java 2009-10-14
05:37:42 UTC (rev 4025)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/invalidBindingAnnotations/FooStereotype.java 2009-10-14
07:19:49 UTC (rev 4026)
@@ -12,11 +12,11 @@
import javax.enterprise.inject.stereotype.Stereotype;
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Target( { TYPE, METHOD, FIELD })
@Retention(RUNTIME)
@Documented
@FooBinding("abc")
-@Stereotype
+public @Stereotype
@interface FooStereotype
{
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/invalidBindingAnnotations/InvalidInterceptorBindingAnnotationsTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/invalidBindingAnnotations/InvalidInterceptorBindingAnnotationsTest.java 2009-10-14
05:37:42 UTC (rev 4025)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/invalidBindingAnnotations/InvalidInterceptorBindingAnnotationsTest.java 2009-10-14
07:19:49 UTC (rev 4026)
@@ -1,6 +1,7 @@
package
org.jboss.jsr299.tck.tests.interceptors.definition.broken.invalidBindingAnnotations;
import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.test.audit.annotations.SpecAssertion;
import org.jboss.test.audit.annotations.SpecVersion;
import org.jboss.testharness.impl.packaging.Artifact;
@@ -12,9 +13,9 @@
@ExpectedDeploymentException(DeploymentError.class)
@SpecVersion(spec="cdi", version="PFD2")
@BeansXml("beans.xml")
-public class InvalidInterceptorBindingAnnotationsTest
+public class InvalidInterceptorBindingAnnotationsTest extends AbstractJSR299Test
{
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertion(section = "9.5.2", id = "d")
public void testInterceptorBindingsWithConflictingAnnotationMembersNotOk()
{
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/sameClassListedTwiceInBeansXml/SameClassListedTwiceInBeansXmlTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/sameClassListedTwiceInBeansXml/SameClassListedTwiceInBeansXmlTest.java 2009-10-14
05:37:42 UTC (rev 4025)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/sameClassListedTwiceInBeansXml/SameClassListedTwiceInBeansXmlTest.java 2009-10-14
07:19:49 UTC (rev 4026)
@@ -15,7 +15,7 @@
@BeansXml("beans.xml")
public class SameClassListedTwiceInBeansXmlTest extends AbstractJSR299Test
{
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertion(section = "9.4", id = "cb")
public void testSameInterceptorClassListedTwiceInBeansXmlNotOk()
{
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorNotListedInBeansXml/Transactional.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorNotListedInBeansXml/Transactional.java 2009-10-14
05:37:42 UTC (rev 4025)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorNotListedInBeansXml/Transactional.java 2009-10-14
07:19:49 UTC (rev 4026)
@@ -12,7 +12,7 @@
import javax.interceptor.InterceptorBinding;
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Target( { TYPE, METHOD })
@Retention(RUNTIME)
@Documented
@InterceptorBinding
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/AnotherInterceptor.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/AnotherInterceptor.java 2009-10-14
05:37:42 UTC (rev 4025)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/AnotherInterceptor.java 2009-10-14
07:19:49 UTC (rev 4026)
@@ -4,7 +4,6 @@
import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;
-@Interceptor
class AnotherInterceptor
{
public static boolean first = false;
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/FirstInterceptor.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/FirstInterceptor.java 2009-10-14
05:37:42 UTC (rev 4025)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/FirstInterceptor.java 2009-10-14
07:19:49 UTC (rev 4026)
@@ -4,7 +4,7 @@
import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;
-@Interceptor
+@Interceptor @Secure
public class FirstInterceptor
{
public static boolean calledFirst = false;
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/Foo.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/Foo.java 2009-10-14
05:37:42 UTC (rev 4025)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/Foo.java 2009-10-14
07:19:49 UTC (rev 4026)
@@ -2,7 +2,7 @@
import javax.interceptor.Interceptors;
-(a)Interceptors({FirstInterceptor.class, SecondInterceptor.class})
+@Secure
class Foo
{
public void bar() {}
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/InterceptorOrderTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/InterceptorOrderTest.java 2009-10-14
05:37:42 UTC (rev 4025)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/InterceptorOrderTest.java 2009-10-14
07:19:49 UTC (rev 4026)
@@ -13,7 +13,7 @@
@BeansXml("beans.xml")
public class InterceptorOrderTest extends AbstractJSR299Test
{
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertions({
@SpecAssertion(section = "9.4", id = "b"),
@SpecAssertion(section = "9.5", id = "ea")
@@ -29,7 +29,7 @@
assert SecondInterceptor.calledFirst;
}
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertion(section = "9.4", id = "f")
public void testInterceptorsDeclaredUsingInterceptorsCalledBeforeInterceptorBinding()
{
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/SecondInterceptor.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/SecondInterceptor.java 2009-10-14
05:37:42 UTC (rev 4025)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/SecondInterceptor.java 2009-10-14
07:19:49 UTC (rev 4026)
@@ -4,7 +4,7 @@
import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;
-@Interceptor
+@Interceptor @Secure
public class SecondInterceptor
{
public static boolean calledFirst = false;
Copied:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/Secure.java
(from rev 4022,
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/Transactional.java)
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/Secure.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorOrder/Secure.java 2009-10-14
07:19:49 UTC (rev 4026)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.interceptors.definition.interceptorOrder;
+
+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 java.lang.annotation.Target;
+
+import javax.interceptor.InterceptorBinding;
+
+@Target( { TYPE, METHOD})
+@Retention(RUNTIME)
+@Documented
+@InterceptorBinding
+@interface Secure
+{
+
+}
\ No newline at end of file
Modified:
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/beans.xml
===================================================================
---
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/beans.xml 2009-10-14
05:37:42 UTC (rev 4025)
+++
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/beans.xml 2009-10-14
07:19:49 UTC (rev 4026)
@@ -1,7 +1,4 @@
<beans>
- <interceptors>
-
<class>org.jboss.jsr299.tck.tests.interceptors.definition.interceptorCalledBeforeDecorator.TransactionInterceptor</class>
- </interceptors>
<decorators>
<class>org.jboss.jsr299.tck.tests.interceptors.definition.interceptorCalledBeforeDecorator.FooDecorator</class>
</decorators>