Author: pete.muir(a)jboss.org
Date: 2009-06-28 17:25:03 -0400 (Sun, 28 Jun 2009)
New Revision: 2922
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/javax.enterprise.inject.spi.Extension
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/addDefinitionError/AddDefinitionErrorTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/failsDuringBeanDiscovery/DeploymentFailureTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/failsDuringValidation/AfterBeanDiscoveryFailureTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/failsDuringValidation/BeanDiscoveryObserver.java
Log:
More chapter 11 tests
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/addDefinitionError/AddDefinitionErrorTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/addDefinitionError/AddDefinitionErrorTest.java 2009-06-28
18:15:29 UTC (rev 2921)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/addDefinitionError/AddDefinitionErrorTest.java 2009-06-28
21:25:03 UTC (rev 2922)
@@ -20,12 +20,14 @@
@ExpectedDeploymentException(DefinitionError.class)
public class AddDefinitionErrorTest extends AbstractJSR299Test
{
- @Test(groups="incontainer-ri-broken")
+ @Test(groups="broken")
@SpecAssertion(section = "11.5.2", id = "c")
public void testObserverDefinitionErrorTreatedAsDefinitionError()
{
assert false;
}
+
+ // TODO make this an integration test using Extension
// FIXME need to communicate state of container at the time of failure
// @Override
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryObserver.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryObserver.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryObserver.java 2009-06-28
21:25:03 UTC (rev 2922)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, 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.deployment.lifecycle.broken.beanDiscoveryMethodThrowsException;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.BeforeBeanDiscovery;
+import javax.enterprise.inject.spi.Extension;
+
+/**
+ * @author pmuir
+ *
+ */
+public class BeforeBeanDiscoveryObserver implements Extension
+{
+
+ public void observe(@Observes BeforeBeanDiscovery beforeBeanDiscovery)
+ {
+ throw new RuntimeException();
+ }
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryObserver.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java 2009-06-28
21:25:03 UTC (rev 2922)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, 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.deployment.lifecycle.broken.beanDiscoveryMethodThrowsException;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DefinitionError;
+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.Resource;
+import org.jboss.testharness.impl.packaging.Resources;
+import org.testng.annotations.Test;
+
+/**
+ * @author pmuir
+ *
+ */
+@Artifact
+@Resources({
+ @Resource(source="javax.enterprise.inject.spi.Extension",
destination="WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
+})
+@IntegrationTest
+(a)ExpectedDeploymentException(DefinitionError.class)
+public class BeforeBeanDiscoveryThrowsExceptionTest extends AbstractJSR299Test
+{
+
+ @Test(groups="incontainer-ri-broken")
+ @SpecAssertion(section="11.5.1", id="c")
+ public void testThrowsException()
+ {
+ assert false;
+ }
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/failsDuringBeanDiscovery/DeploymentFailureTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/failsDuringBeanDiscovery/DeploymentFailureTest.java 2009-06-28
18:15:29 UTC (rev 2921)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/failsDuringBeanDiscovery/DeploymentFailureTest.java 2009-06-28
21:25:03 UTC (rev 2922)
@@ -18,6 +18,8 @@
@ExpectedDeploymentException(DefinitionError.class)
public class DeploymentFailureTest extends AbstractJSR299Test
{
+
+ // TODO make this an integration test using Extension
@Test
@SpecAssertions({
@SpecAssertion(section = "10.5.2", id = "e"),
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/failsDuringValidation/AfterBeanDiscoveryFailureTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/failsDuringValidation/AfterBeanDiscoveryFailureTest.java 2009-06-28
18:15:29 UTC (rev 2921)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/failsDuringValidation/AfterBeanDiscoveryFailureTest.java 2009-06-28
21:25:03 UTC (rev 2922)
@@ -40,6 +40,9 @@
@ExpectedDeploymentException(UnsatisfiedResolutionException.class)
public class AfterBeanDiscoveryFailureTest extends AbstractJSR299Test
{
+
+ // TODO make this an integration test using Extension
+
@Test
@SpecAssertions({
@SpecAssertion(section = "11.5.2", id = "a"),
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/failsDuringValidation/BeanDiscoveryObserver.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/failsDuringValidation/BeanDiscoveryObserver.java 2009-06-28
18:15:29 UTC (rev 2921)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/failsDuringValidation/BeanDiscoveryObserver.java 2009-06-28
21:25:03 UTC (rev 2922)
@@ -6,11 +6,11 @@
class BeanDiscoveryObserver
{
- private static boolean managerInitialized;
+ private static boolean afterBeanDiscovery;
public void afterBeanDiscovery(@Observes AfterBeanDiscovery event)
{
- managerInitialized = true;
+ afterBeanDiscovery = true;
}
public void afterDeploymentValidation(@Observes AfterDeploymentValidation event)
@@ -18,13 +18,13 @@
assert false : "Deployment should have already failed because of the presence
of an unsatisfied dependency";
}
- public static boolean isManagerInitialized()
+ public static boolean isAfterBeanDiscovery()
{
- return managerInitialized;
+ return afterBeanDiscovery;
}
- public static void setManagerInitialized(boolean managerInitialized)
+ public static void setAfterBeanDiscovery(boolean managerInitialized)
{
- BeanDiscoveryObserver.managerInitialized = managerInitialized;
+ BeanDiscoveryObserver.afterBeanDiscovery = managerInitialized;
}
}
Added:
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/javax.enterprise.inject.spi.Extension
===================================================================
---
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/javax.enterprise.inject.spi.Extension
(rev 0)
+++
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/javax.enterprise.inject.spi.Extension 2009-06-28
21:25:03 UTC (rev 2922)
@@ -0,0 +1 @@
+org.jboss.jsr299.tck.tests.deployment.lifecycle.broken.beanDiscoveryMethodThrowsException.BeforeBeanDiscoveryObserver