Author: oskutka(a)redhat.com
Date: 2010-03-03 08:10:45 -0500 (Wed, 03 Mar 2010)
New Revision: 5990
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassClassLevelInterceptorTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassClassLevelMissile.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassClassLevelMissileLocal.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassMethodLevelInterceptorTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassMethodLevelMissile.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassMethodLevelMissileLocal.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodClassLevelInterceptorTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodClassLevelMissile.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodClassLevelMissileLocal.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodMethodLevelInterceptorTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodMethodLevelMissile.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodMethodLevelMissileLocal.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FooBinding.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/MissileInterceptor.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/BusinessMethodBinding.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/InterceptorForLifecycleTargetMethodTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/LifecycleInterceptor.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/Missile.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/MissileLocal.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/GuidedMissile.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/LockInterceptor.java
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/beans.xml
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/beans.xml
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/MultipleInterceptorBindingsTest.java
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/beans.xml
cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
Log:
Extending test cases for interceptors
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassClassLevelInterceptorTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassClassLevelInterceptorTest.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassClassLevelInterceptorTest.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentFailure;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentFailure.class)
+@IntegrationTest
+(a)BeansXml("beans.xml")
+(a)Packaging(PackagingType.EAR)
+public class FinalClassClassLevelInterceptorTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertion(section = "9.3", id = "ca")
+ public void testFinalClassWithClassLevelInterceptor() throws Exception
+ {
+ assert false;
+/* MissileInterceptor.intercepted = false;
+
+ FinalClassMissileLocal missile = getInstanceByType(FinalClassMissileLocal.class);
+ missile.fire();
+
+ assert MissileInterceptor.intercepted;*/
+ }
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassClassLevelMissile.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassClassLevelMissile.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassClassLevelMissile.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,26 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor;
+
+import javax.ejb.Stateful;
+
+@Stateful
+@FooBinding
+public final class FinalClassClassLevelMissile implements
FinalClassClassLevelMissileLocal
+{
+ public void fire() {}
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassClassLevelMissileLocal.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassClassLevelMissileLocal.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassClassLevelMissileLocal.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor;
+
+import javax.ejb.Local;
+
+@Local
+public interface FinalClassClassLevelMissileLocal
+{
+ void fire();
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassMethodLevelInterceptorTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassMethodLevelInterceptorTest.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassMethodLevelInterceptorTest.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentFailure;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentFailure.class)
+@IntegrationTest
+(a)BeansXml("beans.xml")
+(a)Packaging(PackagingType.EAR)
+public class FinalClassMethodLevelInterceptorTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertion(section = "9.3", id = "da")
+ public void testFinalClassWithMethodLevelInterceptor() throws Exception
+ {
+ assert false;
+/* MissileInterceptor.intercepted = false;
+
+ FinalClassMethodLevelMissileLocal missile =
getInstanceByType(FinalClassMethodLevelMissileLocal.class);
+ missile.fire();
+
+ assert MissileInterceptor.intercepted;*/
+ }
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassMethodLevelMissile.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassMethodLevelMissile.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassMethodLevelMissile.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,26 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor;
+
+import javax.ejb.Stateful;
+
+@Stateful
+public final class FinalClassMethodLevelMissile implements
FinalClassMethodLevelMissileLocal
+{
+ @FooBinding
+ public void fire() {}
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassMethodLevelMissileLocal.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassMethodLevelMissileLocal.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalClassMethodLevelMissileLocal.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor;
+
+import javax.ejb.Local;
+
+@Local
+public interface FinalClassMethodLevelMissileLocal
+{
+ void fire();
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodClassLevelInterceptorTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodClassLevelInterceptorTest.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodClassLevelInterceptorTest.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentFailure;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentFailure.class)
+@IntegrationTest
+(a)BeansXml("beans.xml")
+(a)Packaging(PackagingType.EAR)
+public class FinalMethodClassLevelInterceptorTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertion(section = "9.3", id = "cb")
+ public void testFinalMethodWithClassLevelInterceptor() throws Exception
+ {
+ assert false;
+/* MissileInterceptor.intercepted = false;
+
+ FinalMethodMissileLocal missile = getInstanceByType(FinalMethodMissileLocal.class);
+ missile.fire();
+
+ assert MissileInterceptor.intercepted;*/
+ }
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodClassLevelMissile.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodClassLevelMissile.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodClassLevelMissile.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,28 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor;
+
+import javax.ejb.Stateful;
+
+@Stateful
+@FooBinding
+public class FinalMethodClassLevelMissile implements FinalMethodClassLevelMissileLocal
+{
+ public void fire() {}
+
+ public final void finalManeuver() {}
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodClassLevelMissileLocal.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodClassLevelMissileLocal.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodClassLevelMissileLocal.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor;
+
+import javax.ejb.Local;
+
+@Local
+public interface FinalMethodClassLevelMissileLocal
+{
+ void fire();
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodMethodLevelInterceptorTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodMethodLevelInterceptorTest.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodMethodLevelInterceptorTest.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentFailure;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentFailure.class)
+@IntegrationTest
+(a)BeansXml("beans.xml")
+(a)Packaging(PackagingType.EAR)
+public class FinalMethodMethodLevelInterceptorTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertion(section = "9.3", id = "db")
+ public void testFinalMethodWithMethodLevelInterceptor() throws Exception
+ {
+ assert false;
+/* MissileInterceptor.intercepted = false;
+
+ FinalMethodMethodLevelMissileLocal missile =
getInstanceByType(FinalMethodMethodLevelMissileLocal.class);
+ missile.fire();
+
+ assert MissileInterceptor.intercepted;*/
+ }
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodMethodLevelMissile.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodMethodLevelMissile.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodMethodLevelMissile.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,26 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor;
+
+import javax.ejb.Stateful;
+
+@Stateful
+public class FinalMethodMethodLevelMissile implements FinalMethodMethodLevelMissileLocal
+{
+ @FooBinding
+ public final void fire() {}
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodMethodLevelMissileLocal.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodMethodLevelMissileLocal.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FinalMethodMethodLevelMissileLocal.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor;
+
+import javax.ejb.Local;
+
+@Local
+public interface FinalMethodMethodLevelMissileLocal
+{
+ void fire();
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FooBinding.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FooBinding.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/FooBinding.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor;
+
+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 FooBinding
+{
+}
\ No newline at end of file
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/MissileInterceptor.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/MissileInterceptor.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/MissileInterceptor.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor;
+
+import java.io.Serializable;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@Interceptor @FooBinding
+public class MissileInterceptor implements Serializable
+{
+ public static boolean intercepted = false;
+
+
+ @AroundInvoke public Object alwaysReturnThis(InvocationContext ctx) throws Exception
+ {
+ intercepted = true;
+ return ctx.proceed();
+ }
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/BusinessMethodBinding.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/BusinessMethodBinding.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/BusinessMethodBinding.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package
org.jboss.jsr299.tck.tests.interceptors.definition.broken.interceptorForLifecycleTargetMethod;
+
+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
+public @interface BusinessMethodBinding
+{
+
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/InterceptorForLifecycleTargetMethodTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/InterceptorForLifecycleTargetMethodTest.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/InterceptorForLifecycleTargetMethodTest.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package
org.jboss.jsr299.tck.tests.interceptors.definition.broken.interceptorForLifecycleTargetMethod;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentFailure;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentFailure.class)
+@IntegrationTest
+(a)BeansXml("beans.xml")
+(a)Packaging(PackagingType.EAR)
+public class InterceptorForLifecycleTargetMethodTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertion(section = "9.2", id = "d")
+ public void testInterceptorForLifecycleTargetMethod() throws Exception
+ {
+ assert false;
+ }
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/LifecycleInterceptor.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/LifecycleInterceptor.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/LifecycleInterceptor.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package
org.jboss.jsr299.tck.tests.interceptors.definition.broken.interceptorForLifecycleTargetMethod;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@Interceptor @BusinessMethodBinding
+public class LifecycleInterceptor implements Serializable
+{
+ public static boolean intercepted = false;
+
+ @PostConstruct
+ public void postConstruct(InvocationContext ctx) {
+ intercepted = true;
+ try
+ {
+ ctx.proceed();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException();
+ }
+ }
+
+ public static boolean isIntercepted()
+ {
+ return intercepted;
+ }
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/Missile.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/Missile.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/Missile.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,26 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package
org.jboss.jsr299.tck.tests.interceptors.definition.broken.interceptorForLifecycleTargetMethod;
+
+import javax.ejb.Stateful;
+
+@Stateful
+@BusinessMethodBinding
+public class Missile implements MissileLocal
+{
+ public void fire() {}
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/MissileLocal.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/MissileLocal.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/MissileLocal.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package
org.jboss.jsr299.tck.tests.interceptors.definition.broken.interceptorForLifecycleTargetMethod;
+
+import javax.ejb.Local;
+
+@Local
+public interface MissileLocal
+{
+ void fire();
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/GuidedMissile.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/GuidedMissile.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/GuidedMissile.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.multipleBindings;
+
+public class GuidedMissile implements Missile
+{
+ @Slow @Deadly
+ public void lockAndFire()
+ {
+ }
+
+ @Fast @Deadly
+ public void fire()
+ {
+ }
+
+}
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/LockInterceptor.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/LockInterceptor.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/LockInterceptor.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.interceptors.definition.multipleBindings;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@Interceptor @Slow @Deadly
+class LockInterceptor
+{
+ public static boolean intercepted = false;
+
+ @AroundInvoke public Object alwaysReturnThis(InvocationContext ctx) throws Exception
+ {
+ intercepted = true;
+ return ctx.proceed();
+ }
+}
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 2010-03-02
23:11:32 UTC (rev 5989)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/MultipleInterceptorBindingsTest.java 2010-03-03
13:10:45 UTC (rev 5990)
@@ -32,7 +32,9 @@
@Test
@SpecAssertions({
@SpecAssertion(section = "9.5.1", id = "a"),
- @SpecAssertion(section = "9.5", id = "ca")
+ @SpecAssertion(section = "9.5", id = "ca"),
+ @SpecAssertion(section = "9.2", id = "ab"),
+ @SpecAssertion(section = "9.3", id = "ba")
})
public void testInterceptorAppliedToBeanWithAllBindings()
{
@@ -55,4 +57,20 @@
assert !MissileInterceptor.intercepted;
}
+
+ @Test
+ @SpecAssertion(section = "9.3", id = "bb")
+ public void testMultipleInterceptorsOnMethod()
+ {
+ LockInterceptor.intercepted = false;
+
+ GuidedMissile bullet = getInstanceByType(GuidedMissile.class);
+
+ bullet.fire();
+ assert !LockInterceptor.intercepted;
+
+ bullet.lockAndFire();
+ assert LockInterceptor.intercepted;
+ }
+
}
Added:
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/beans.xml
===================================================================
---
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/beans.xml
(rev 0)
+++
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/broken/finalClassInterceptor/beans.xml 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,5 @@
+<beans>
+ <interceptors>
+
<class>org.jboss.jsr299.tck.tests.interceptors.definition.broken.finalClassInterceptor.MissileInterceptor</class>
+ </interceptors>
+</beans>
Added:
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/beans.xml
===================================================================
---
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/beans.xml
(rev 0)
+++
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorForLifecycleTargetMethod/beans.xml 2010-03-03
13:10:45 UTC (rev 5990)
@@ -0,0 +1,5 @@
+<beans>
+ <interceptors>
+
<class>org.jboss.jsr299.tck.tests.interceptors.definition.broken.interceptorForLifecycleTargetMethod.LifecycleInterceptor</class>
+ </interceptors>
+</beans>
Modified:
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/beans.xml
===================================================================
---
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/beans.xml 2010-03-02
23:11:32 UTC (rev 5989)
+++
cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/interceptors/definition/multipleBindings/beans.xml 2010-03-03
13:10:45 UTC (rev 5990)
@@ -1,5 +1,6 @@
<beans>
<interceptors>
<class>org.jboss.jsr299.tck.tests.interceptors.definition.multipleBindings.MissileInterceptor</class>
+
<class>org.jboss.jsr299.tck.tests.interceptors.definition.multipleBindings.LockInterceptor</class>
</interceptors>
</beans>
Modified: cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
===================================================================
--- cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2010-03-02 23:11:32 UTC (rev
5989)
+++ cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2010-03-03 13:10:45 UTC (rev
5990)
@@ -4579,17 +4579,47 @@
<text>An interceptor binding may be declared by annotating the bean class, or
a method of the bean class, with the interceptor binding type.</text>
</assertion>
- <assertion id="b">
+ <group>
<text>A bean class or method of a bean class may declare multiple interceptor
bindings.</text>
- </assertion>
+ <assertion id="ba">
+ <text>A bean class may declare multiple interceptor bindings.</text>
+ </assertion>
+ <assertion id="bb">
+ <text>A method of a bean class may declare multiple interceptor
bindings.</text>
+ </assertion>
+ </group>
- <assertion id="c">
+ <group>
<text>If the bean class of a managed bean declares or inherits a class level
interceptor binding or a stereotype with interceptor bindings, it must not be declared
final, or have any non-static, non-private, final methods. If a managed bean has a
class-level interceptor binding and is declared final or has a non-static, non-private,
final method, the container automatically detects the problem and treats it as a
definition error.</text>
- </assertion>
+ <assertion id="ca">
+ <text>If the bean class of a managed bean declares a class level interceptor
binding, it must not be declared final.</text>
+ </assertion>
+ <assertion id="cb">
+ <text>If the bean class of a managed bean declares a class level interceptor
binding, it must not have any non-static, non-private, final methods.</text>
+ </assertion>
+ <assertion id="cc">
+ <text>If the bean class of a managed bean inherits a class level interceptor
binding, it must not be declared final.</text>
+ </assertion>
+ <assertion id="cd">
+ <text>If the bean class of a managed bean inherits a class level interceptor
binding, it must not have any non-static, non-private, final methods.</text>
+ </assertion>
+ <assertion id="ce">
+ <text>If the bean class of a managed bean inherits a stereotype with
interceptor bindings, it must not be declared final.</text>
+ </assertion>
+ <assertion id="cf">
+ <text>If the bean class of a managed bean inherits a stereotype with
interceptor bindings, it must not have any non-static, non-private, final
methods.</text>
+ </assertion>
+ </group>
- <assertion id="d">
+ <group>
<text>If a non-static, non-private method of a bean class of a managed bean
declares a method level interceptor binding, neither the method nor the bean class may be
declared final. If a non-static, non-private, final method of a managed bean has a method
level interceptor binding, the container automatically detects the problem and treats it
as a definition error.</text>
- </assertion>
+ <assertion id="da">
+ <text>If a non-static, non-private method of a bean class of a managed bean
declares a method level interceptor binding, the bean class may not be declared
final.</text>
+ </assertion>
+ <assertion id="db">
+ <text>If a non-static, non-private method of a bean class of a managed bean
declares a method level interceptor binding, the method may not be declared
final.</text>
+ </assertion>
+ </group>
</section>
<section id="9.4" title="Interceptor enablement and
ordering">