Author: pete.muir(a)jboss.org
Date: 2010-01-22 11:58:41 -0500 (Fri, 22 Jan 2010)
New Revision: 5614
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextDestroysBeansTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/NormalContextTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/addDefinitionError/AddDefinitionErrorTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/normalScope/AddingNormalScopeTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/passivatingScope/AddingPassivatingScopeTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/alternative/metadata/AlternativeMetadataTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/ProcessAnnotatedTypeTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processAnnotatedObserverThrowsException/ProcessAnnotatedTypeEventThrowsExceptionTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/ProcessInjectionTargetEventThrowsExceptionTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ContainerEventTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/broken/processBeanObserverRegistersException/AddDefinitionErrorTest.java
Log:
port "CDITCK-78, and switch to always using @Extension" to trunk
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextDestroysBeansTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextDestroysBeansTest.java 2010-01-22
16:57:42 UTC (rev 5613)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextDestroysBeansTest.java 2010-01-22
16:58:41 UTC (rev 5614)
@@ -26,7 +26,7 @@
import org.jboss.test.audit.annotations.SpecVersion;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.jboss.testharness.impl.packaging.Resource;
+import org.jboss.testharness.impl.packaging.jsr299.Extension;
import org.testng.annotations.Test;
/**
@@ -38,7 +38,7 @@
@Artifact
@IntegrationTest
@SpecVersion(spec="cdi", version="20091101")
-@Resource(source = "javax.enterprise.inject.spi.Extension", destination =
"WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
+(a)Extension("javax.enterprise.inject.spi.Extension")
public class ContextDestroysBeansTest extends AbstractJSR299Test
{
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java 2010-01-22
16:57:42 UTC (rev 5613)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java 2010-01-22
16:58:41 UTC (rev 5614)
@@ -29,15 +29,12 @@
import org.jboss.test.audit.annotations.SpecVersion;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.jboss.testharness.impl.packaging.Resource;
-import org.jboss.testharness.impl.packaging.Resources;
+import org.jboss.testharness.impl.packaging.jsr299.Extension;
import org.testng.annotations.Test;
@Artifact
@SpecVersion(spec="cdi", version="20091101")
-@Resources({
- @Resource(source="javax.enterprise.inject.spi.Extension",
destination="WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
-})
+(a)Extension("javax.enterprise.inject.spi.Extension")
@IntegrationTest
public class ContextTest extends AbstractJSR299Test
{
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/NormalContextTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/NormalContextTest.java 2010-01-22
16:57:42 UTC (rev 5613)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/NormalContextTest.java 2010-01-22
16:58:41 UTC (rev 5614)
@@ -27,7 +27,7 @@
import org.jboss.test.audit.annotations.SpecVersion;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.jboss.testharness.impl.packaging.Resource;
+import org.jboss.testharness.impl.packaging.jsr299.Extension;
import org.testng.annotations.Test;
/**
@@ -39,7 +39,7 @@
@Artifact
@SpecVersion(spec="cdi", version="20091101")
@IntegrationTest
-@Resource(source = "javax.enterprise.inject.spi.Extension", destination =
"WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
+(a)Extension("javax.enterprise.inject.spi.Extension")
public class NormalContextTest extends AbstractJSR299Test
{
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java 2010-01-22
16:57:42 UTC (rev 5613)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java 2010-01-22
16:58:41 UTC (rev 5614)
@@ -22,17 +22,14 @@
import org.jboss.test.audit.annotations.SpecVersion;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.jboss.testharness.impl.packaging.Resource;
-import org.jboss.testharness.impl.packaging.Resources;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.jboss.testharness.impl.packaging.jsr299.Extension;
import org.testng.annotations.Test;
@Artifact
@SpecVersion(spec="cdi", version="20091101")
@BeansXml("beans.xml")
-@Resources({
- @Resource(source="javax.enterprise.inject.spi.Extension",
destination="WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
-})
+(a)Extension("javax.enterprise.inject.spi.Extension")
@IntegrationTest
public class CustomBeanImplementationTest extends AbstractJSR299Test
{
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/addDefinitionError/AddDefinitionErrorTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/addDefinitionError/AddDefinitionErrorTest.java 2010-01-22
16:57:42 UTC (rev 5613)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/addDefinitionError/AddDefinitionErrorTest.java 2010-01-22
16:58:41 UTC (rev 5614)
@@ -24,8 +24,7 @@
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.jboss.testharness.impl.packaging.jsr299.Extension;
import org.testng.annotations.Test;
/**
@@ -36,9 +35,7 @@
* @author Dan Allen
*/
@Artifact
-@Resources({
- @Resource(source="javax.enterprise.inject.spi.Extension",
destination="WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
-})
+(a)Extension("javax.enterprise.inject.spi.Extension")
// Must be an integration test as it needs a resource copied to a folder
@IntegrationTest
@ExpectedDeploymentException(DeploymentFailure.class)
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java 2010-01-22
16:57:42 UTC (rev 5613)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java 2010-01-22
16:58:41 UTC (rev 5614)
@@ -23,17 +23,14 @@
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.jboss.testharness.impl.packaging.jsr299.Extension;
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")
-})
+(a)Extension("javax.enterprise.inject.spi.Extension")
@IntegrationTest
@ExpectedDeploymentException(DeploymentFailure.class)
@SpecVersion(spec="cdi", version="20091101")
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/normalScope/AddingNormalScopeTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/normalScope/AddingNormalScopeTest.java 2010-01-22
16:57:42 UTC (rev 5613)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/normalScope/AddingNormalScopeTest.java 2010-01-22
16:58:41 UTC (rev 5614)
@@ -23,8 +23,7 @@
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.jboss.testharness.impl.packaging.jsr299.Extension;
import org.testng.annotations.Test;
/**
@@ -32,9 +31,7 @@
*
*/
@Artifact
-@Resources({
- @Resource(source="javax.enterprise.inject.spi.Extension",
destination="WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
-})
+(a)Extension("javax.enterprise.inject.spi.Extension")
@IntegrationTest
@ExpectedDeploymentException(DeploymentFailure.class)
@SpecVersion(spec="cdi", version="20091101")
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/passivatingScope/AddingPassivatingScopeTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/passivatingScope/AddingPassivatingScopeTest.java 2010-01-22
16:57:42 UTC (rev 5613)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/passivatingScope/AddingPassivatingScopeTest.java 2010-01-22
16:58:41 UTC (rev 5614)
@@ -23,17 +23,14 @@
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.jboss.testharness.impl.packaging.jsr299.Extension;
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")
-})
+(a)Extension("javax.enterprise.inject.spi.Extension")
@IntegrationTest
@ExpectedDeploymentException(DeploymentFailure.class)
@SpecVersion(spec="cdi", version="20091101")
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/alternative/metadata/AlternativeMetadataTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/alternative/metadata/AlternativeMetadataTest.java 2010-01-22
16:57:42 UTC (rev 5613)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/alternative/metadata/AlternativeMetadataTest.java 2010-01-22
16:58:41 UTC (rev 5614)
@@ -28,9 +28,8 @@
import org.jboss.test.audit.annotations.SpecVersion;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.jboss.testharness.impl.packaging.Resource;
-import org.jboss.testharness.impl.packaging.Resources;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.jboss.testharness.impl.packaging.jsr299.Extension;
import org.testng.annotations.Test;
/**
@@ -42,7 +41,7 @@
@Artifact
@BeansXml("beans.xml")
-@Resources( { @Resource(source = "javax.enterprise.inject.spi.Extension",
destination =
"WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension") })
+(a)Extension("javax.enterprise.inject.spi.Extension")
@IntegrationTest
@SpecVersion(spec = "cdi", version = "20091101")
public class AlternativeMetadataTest extends AbstractJSR299Test
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/ProcessAnnotatedTypeTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/ProcessAnnotatedTypeTest.java 2010-01-22
16:57:42 UTC (rev 5613)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/ProcessAnnotatedTypeTest.java 2010-01-22
16:58:41 UTC (rev 5614)
@@ -23,8 +23,7 @@
import org.jboss.test.audit.annotations.SpecVersion;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.jboss.testharness.impl.packaging.Resource;
-import org.jboss.testharness.impl.packaging.Resources;
+import org.jboss.testharness.impl.packaging.jsr299.Extension;
import org.testng.annotations.Test;
@@ -36,9 +35,7 @@
*
*/
@Artifact
-@Resources({
- @Resource(source="javax.enterprise.inject.spi.Extension",
destination="WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
-})
+(a)Extension("javax.enterprise.inject.spi.Extension")
@IntegrationTest
@SpecVersion(spec="cdi", version="20091101")
public class ProcessAnnotatedTypeTest extends AbstractJSR299Test
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processAnnotatedObserverThrowsException/ProcessAnnotatedTypeEventThrowsExceptionTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processAnnotatedObserverThrowsException/ProcessAnnotatedTypeEventThrowsExceptionTest.java 2010-01-22
16:57:42 UTC (rev 5613)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processAnnotatedObserverThrowsException/ProcessAnnotatedTypeEventThrowsExceptionTest.java 2010-01-22
16:58:41 UTC (rev 5614)
@@ -24,8 +24,7 @@
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.jboss.testharness.impl.packaging.jsr299.Extension;
import org.testng.annotations.Test;
/**
@@ -36,9 +35,7 @@
*/
@Artifact
@ExpectedDeploymentException(DeploymentFailure.class)
-@Resources({
- @Resource(source="javax.enterprise.inject.spi.Extension",
destination="WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
-})
+(a)Extension("javax.enterprise.inject.spi.Extension")
@IntegrationTest
@SpecVersion(spec="cdi", version="20091101")
public class ProcessAnnotatedTypeEventThrowsExceptionTest extends AbstractJSR299Test
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/ProcessInjectionTargetEventThrowsExceptionTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/ProcessInjectionTargetEventThrowsExceptionTest.java 2010-01-22
16:57:42 UTC (rev 5613)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/broken/processInjectionTargetThrowsException/ProcessInjectionTargetEventThrowsExceptionTest.java 2010-01-22
16:58:41 UTC (rev 5614)
@@ -24,8 +24,7 @@
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.jboss.testharness.impl.packaging.jsr299.Extension;
import org.testng.annotations.Test;
/**
@@ -36,9 +35,7 @@
*/
@Artifact
@ExpectedDeploymentException(DeploymentFailure.class)
-@Resources({
- @Resource(source="javax.enterprise.inject.spi.Extension",
destination="WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
-})
+(a)Extension("javax.enterprise.inject.spi.Extension")
@IntegrationTest
@SpecVersion(spec="cdi", version="20091101")
public class ProcessInjectionTargetEventThrowsExceptionTest extends AbstractJSR299Test
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ContainerEventTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ContainerEventTest.java 2010-01-22
16:57:42 UTC (rev 5613)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ContainerEventTest.java 2010-01-22
16:58:41 UTC (rev 5614)
@@ -32,61 +32,55 @@
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.Resource;
-import org.jboss.testharness.impl.packaging.Resources;
+import org.jboss.testharness.impl.packaging.ear.EjbJarXml;
+import org.jboss.testharness.impl.packaging.jsr299.Extension;
import org.testng.annotations.Test;
/**
- * Tests for ProcessAnnotatedType, ProcessBean and ProcessInjectionTarget events.
+ * Tests for ProcessAnnotatedType, ProcessBean and ProcessInjectionTarget
+ * events.
+ *
* @author Jozef Hartinger
- *
+ *
*/
@Artifact
-@Resources({
- @Resource(source = "javax.enterprise.inject.spi.Extension", destination =
"META-INF/services/javax.enterprise.inject.spi.Extension"),
- @Resource(source = "ejb-jar.xml", destination =
"META-INF/ejb-jar.xml")})
+(a)EjbJarXml("ejb-jar.xml")
@IntegrationTest
@SpecVersion(spec = "cdi", version = "20091101")
+(a)Extension("javax.enterprise.inject.spi.Extension")
@Packaging(PackagingType.EAR)
public class ContainerEventTest extends AbstractJSR299Test
{
@Test
- @SpecAssertions({
- @SpecAssertion(section = "12.3", id = "ba"),
- @SpecAssertion(section = "11.5.6", id = "aaa")})
- public void testProcessInjectionTargetFiredForManagedBean() {
+ @SpecAssertions( { @SpecAssertion(section = "12.3", id = "ba"),
@SpecAssertion(section = "11.5.6", id = "aaa") })
+ public void testProcessInjectionTargetFiredForManagedBean()
+ {
assert ProcessInjectionTargetObserver.getManagedBeanEvent() != null;
validateManagedBean(ProcessInjectionTargetObserver.getManagedBeanEvent().getAnnotatedType());
}
-
+
@Test
- @SpecAssertions({
- @SpecAssertion(section = "11.5.6", id = "aab"),
- @SpecAssertion(section = "11.5.6", id = "abb"),
- @SpecAssertion(section = "12.3", id = "db")})
- public void testProcessInjectionTargetFiredForSessionBean() {
+ @SpecAssertions( { @SpecAssertion(section = "11.5.6", id = "aab"),
@SpecAssertion(section = "11.5.6", id = "abb"), @SpecAssertion(section
= "12.3", id = "db") })
+ public void testProcessInjectionTargetFiredForSessionBean()
+ {
assert ProcessInjectionTargetObserver.getStatelessSessionBeanEvent() != null;
assert ProcessInjectionTargetObserver.getStatefulSessionBeanEvent() != null;
validateStatelessSessionBean(ProcessInjectionTargetObserver.getStatelessSessionBeanEvent().getAnnotatedType());
validateStatefulSessionBean(ProcessInjectionTargetObserver.getStatefulSessionBeanEvent().getAnnotatedType());
}
-
+
@Test
- @SpecAssertions({
- @SpecAssertion(section = "11.5.6", id = "aaf"),
- @SpecAssertion(section = "11.5.6", id = "abf"),
- @SpecAssertion(section = "12.3", id = "dh")})
- public void testProcessInjectionTargetFiredForSessionBeanInterceptor() {
+ @SpecAssertions( { @SpecAssertion(section = "11.5.6", id = "aaf"),
@SpecAssertion(section = "11.5.6", id = "abf"), @SpecAssertion(section
= "12.3", id = "dh") })
+ public void testProcessInjectionTargetFiredForSessionBeanInterceptor()
+ {
assert ProcessInjectionTargetObserver.getSessionBeanInterceptorEvent() != null;
validateSessionBeanInterceptor(ProcessInjectionTargetObserver.getSessionBeanInterceptorEvent().getAnnotatedType());
}
-
+
@Test
- @SpecAssertions({
- @SpecAssertion(section="11.5.6", id="aal"),
- @SpecAssertion(section="11.5.6", id="aam")
- })
- public void testTypeOfProcessInjectionTargetParameter() {
+ @SpecAssertions( { @SpecAssertion(section = "11.5.6", id = "aal"),
@SpecAssertion(section = "11.5.6", id = "aam") })
+ public void testTypeOfProcessInjectionTargetParameter()
+ {
assert ProcessInjectionTargetObserver.getEvent1Observed() == 0;
assert ProcessInjectionTargetObserver.getEvent2Observed() == 0;
assert ProcessInjectionTargetObserver.getEvent3Observed() == 0;
@@ -96,21 +90,23 @@
}
@Test
- @SpecAssertion(section = "12.3", id= "bb")
- public void testProcessAnnotatedTypeFiredForSessionBean() {
+ @SpecAssertion(section = "12.3", id = "bb")
+ public void testProcessAnnotatedTypeFiredForSessionBean()
+ {
assert ProcessAnnotatedTypeObserver.getStatelessSessionBeanEvent() != null;
assert ProcessAnnotatedTypeObserver.getStatefulSessionBeanEvent() != null;
validateStatelessSessionBean(ProcessAnnotatedTypeObserver.getStatelessSessionBeanEvent().getAnnotatedType());
validateStatefulSessionBean(ProcessAnnotatedTypeObserver.getStatefulSessionBeanEvent().getAnnotatedType());
}
-
+
@Test
- @SpecAssertion(section = "12.3", id= "bh")
- public void testProcessAnnotatedTypeFiredForSessionBeanInterceptor() {
+ @SpecAssertion(section = "12.3", id = "bh")
+ public void testProcessAnnotatedTypeFiredForSessionBeanInterceptor()
+ {
assert ProcessAnnotatedTypeObserver.getSessionBeanInterceptorEvent() != null;
validateSessionBeanInterceptor(ProcessAnnotatedTypeObserver.getSessionBeanInterceptorEvent().getAnnotatedType());
}
-
+
@Test
@SpecAssertion(section = "11.5.8", id = "ba")
public void testProcessManagedBeanFired()
@@ -118,62 +114,66 @@
assert ProcessBeanObserver.getProcessManagedBeanEvent() != null;
validateManagedBean(ProcessBeanObserver.getProcessManagedBeanEvent().getAnnotatedBeanClass());
}
-
+
@Test
- @SpecAssertions({
- @SpecAssertion(section="11.5.8", id="c"),
- @SpecAssertion(section="12.3", id="fb")})
- public void testProcessSessionBeanFiredForStatelessSessionBean() {
+ @SpecAssertions( { @SpecAssertion(section = "11.5.8", id = "c"),
@SpecAssertion(section = "12.3", id = "fb") })
+ public void testProcessSessionBeanFiredForStatelessSessionBean()
+ {
assert ProcessBeanObserver.getProcessStatelessSessionBeanEvent() != null;
validateStatelessSessionBean(ProcessBeanObserver.getProcessStatelessSessionBeanEvent().getAnnotatedBeanClass());
}
-
+
@Test
- @SpecAssertions({
- @SpecAssertion(section="11.5.8", id="c"),
- @SpecAssertion(section="12.3", id="fb")
- })
- public void testProcessSessionBeanFiredForStatefulSessionBean() {
+ @SpecAssertions( { @SpecAssertion(section = "11.5.8", id = "c"),
@SpecAssertion(section = "12.3", id = "fb") })
+ public void testProcessSessionBeanFiredForStatefulSessionBean()
+ {
assert ProcessBeanObserver.getProcessStatefulSessionBeanEvent() != null;
validateStatefulSessionBean(ProcessBeanObserver.getProcessStatefulSessionBeanEvent().getAnnotatedBeanClass());
}
-
+
@Test
- @SpecAssertion(section="11.5.8", id="hb")
- public void testGetEJBName() {
+ @SpecAssertion(section = "11.5.8", id = "hb")
+ public void testGetEJBName()
+ {
assert
ProcessBeanObserver.getProcessStatelessSessionBeanEvent().getEjbName().equals("sheep");
assert
ProcessBeanObserver.getProcessStatefulSessionBeanEvent().getEjbName().equals("cow");
}
-
+
@Test
- @SpecAssertion(section="11.5.8", id="hc")
- public void testGetSessionBeanType() {
+ @SpecAssertion(section = "11.5.8", id = "hc")
+ public void testGetSessionBeanType()
+ {
assert
ProcessBeanObserver.getProcessStatelessSessionBeanEvent().getSessionBeanType().equals(STATELESS);
assert
ProcessBeanObserver.getProcessStatefulSessionBeanEvent().getSessionBeanType().equals(STATEFUL);
}
-
- private void validateStatelessSessionBean(Annotated type) {
+
+ private void validateStatelessSessionBean(Annotated type)
+ {
assert type.getBaseType().equals(Sheep.class);
assert rawTypeSetMatches(type.getTypeClosure(), Sheep.class, SheepLocal.class,
Object.class);
assert type.getAnnotations().size() == 2;
- assert annotationSetMatches(type.getAnnotations(), Tame.class, Stateless.class);
//TODO Check
+ assert annotationSetMatches(type.getAnnotations(), Tame.class, Stateless.class); //
TODO
+ //
Check
}
-
- private void validateStatefulSessionBean(Annotated type) {
+
+ private void validateStatefulSessionBean(Annotated type)
+ {
assert type.getBaseType().equals(Cow.class);
assert rawTypeSetMatches(type.getTypeClosure(), Cow.class, CowLocal.class,
Object.class);
assert type.getAnnotations().size() == 0;
}
-
- private void validateSessionBeanInterceptor(AnnotatedType<SheepInterceptor>
type) {
+
+ private void validateSessionBeanInterceptor(AnnotatedType<SheepInterceptor>
type)
+ {
assert type.getBaseType().equals(SheepInterceptor.class);
assert rawTypeSetMatches(type.getTypeClosure(), SheepInterceptor.class,
Object.class);
assert type.getAnnotations().size() == 0;
assert type.getFields().size() == 0;
assert type.getMethods().size() == 1;
}
-
- private void validateManagedBean(AnnotatedType<Farm> type) {
+
+ private void validateManagedBean(AnnotatedType<Farm> type)
+ {
assert type.getBaseType().equals(Farm.class);
assert rawTypeSetMatches(type.getTypeClosure(), Farm.class, Object.class);
assert type.getFields().size() == 1;
@@ -181,5 +181,5 @@
assert type.getMethods().size() == 1;
assert type.getMethods().iterator().next().isAnnotationPresent(Produces.class);
}
-
+
}
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/broken/processBeanObserverRegistersException/AddDefinitionErrorTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/broken/processBeanObserverRegistersException/AddDefinitionErrorTest.java 2010-01-22
16:57:42 UTC (rev 5613)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/broken/processBeanObserverRegistersException/AddDefinitionErrorTest.java 2010-01-22
16:58:41 UTC (rev 5614)
@@ -23,12 +23,12 @@
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.jsr299.Extension;
import org.testng.annotations.Test;
@Artifact
@ExpectedDeploymentException(DeploymentFailure.class)
-@Resource(source = "javax.enterprise.inject.spi.Extension", destination =
"WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
+(a)Extension("javax.enterprise.inject.spi.Extension")
@IntegrationTest
@SpecVersion(spec = "cdi", version = "20091101")
public class AddDefinitionErrorTest extends AbstractJSR299Test