[webbeans-commits] Webbeans SVN: r3588 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken: processAnnotatedObserverThrowsException and 1 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Mon Aug 24 00:12:56 EDT 2009
Author: shane.bryzak at jboss.com
Date: 2009-08-24 00:12:55 -0400 (Mon, 24 Aug 2009)
New Revision: 3588
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/Dog.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/DogBone.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/InjectionTargetProcessor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/ProcessInjectionTargetEventThrowsExceptionTest.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processAnnotatedObserverThrowsException/ProcessAnnotatedTypeEventThrowsExceptionTest.java
Log:
test for 11.5.6.f
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processAnnotatedObserverThrowsException/ProcessAnnotatedTypeEventThrowsExceptionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processAnnotatedObserverThrowsException/ProcessAnnotatedTypeEventThrowsExceptionTest.java 2009-08-24 04:03:17 UTC (rev 3587)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processAnnotatedObserverThrowsException/ProcessAnnotatedTypeEventThrowsExceptionTest.java 2009-08-24 04:12:55 UTC (rev 3588)
@@ -45,7 +45,7 @@
{
@Test
@SpecAssertion(section = "11.5.5", id = "e")
- public void testProcessAnnotatedTypeEventsSent()
+ public void testProcessAnnotatedTypeEventThrowsExceptionNotOk()
{
assert false;
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/Dog.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/Dog.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/Dog.java 2009-08-24 04:12:55 UTC (rev 3588)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.extensions.annotated.broken.processInjectionTargetThrowsException;
+
+import javax.enterprise.inject.Current;
+
+class Dog
+{
+ @Current
+ private DogBone dogBone;
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/DogBone.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/DogBone.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/DogBone.java 2009-08-24 04:12:55 UTC (rev 3588)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.extensions.annotated.broken.processInjectionTargetThrowsException;
+
+class DogBone
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/InjectionTargetProcessor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/InjectionTargetProcessor.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/InjectionTargetProcessor.java 2009-08-24 04:12:55 UTC (rev 3588)
@@ -0,0 +1,13 @@
+package org.jboss.jsr299.tck.tests.extensions.annotated.broken.processInjectionTargetThrowsException;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.Extension;
+import javax.enterprise.inject.spi.ProcessInjectionTarget;
+
+class InjectionTargetProcessor implements Extension
+{
+ public void processDogInjectionTarget(@Observes ProcessInjectionTarget<Dog> injectionTargetEvent)
+ {
+ throw new RuntimeException();
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/ProcessInjectionTargetEventThrowsExceptionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/ProcessInjectionTargetEventThrowsExceptionTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/ProcessInjectionTargetEventThrowsExceptionTest.java 2009-08-24 04:12:55 UTC (rev 3588)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat, Inc. and/or its affiliates, 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.extensions.annotated.broken.processInjectionTargetThrowsException;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.testng.annotations.Test;
+
+/**
+ * Tests that an exception thrown by a ProcessAnnotatedType event observer
+ * is treated as a deployment error
+ *
+ *
+ */
+ at Artifact
+ at ExpectedDeploymentException(DeploymentError.class)
+ at IntegrationTest
+ at SpecVersion(spec="cdi", version="1.0.20090625")
+public class ProcessInjectionTargetEventThrowsExceptionTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertion(section = "11.5.6", id = "f")
+ public void testProcessInjectionTargetEventThrowsExceptionNotOk()
+ {
+ assert false;
+ }
+}
More information about the weld-commits
mailing list