Author: jharting
Date: 2010-04-21 08:20:56 -0400 (Wed, 21 Apr 2010)
New Revision: 6137
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTestEar.java
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTest.java
Log:
Added testcase for BeanManager JNDI lookup in an EAR archive
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTest.java 2010-04-21
11:27:33 UTC (rev 6136)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTest.java 2010-04-21
12:20:56 UTC (rev 6137)
@@ -22,15 +22,20 @@
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.Classes;
import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
import org.testng.annotations.Test;
@Artifact
+(a)Classes(JndiBeanManagerInjected.class)
@IntegrationTest
@SpecVersion(spec = "cdi", version = "20091101")
+(a)Packaging(PackagingType.WAR)
public class ManagerTest extends AbstractJSR299Test
{
- @Test(groups = { "manager", "ejb3", "integration"})
+ @Test(groups = { "manager", "ejb3", "integration" })
@SpecAssertion(section = "11.3", id = "da")
public void testManagerLookupInJndi() throws Exception
{
Added:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTestEar.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTestEar.java
(rev 0)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTestEar.java 2010-04-21
12:20:56 UTC (rev 6137)
@@ -0,0 +1,46 @@
+/*
+ * 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.lookup.manager.jndi;
+
+import javax.enterprise.inject.spi.BeanManager;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Classes;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)Classes(JndiBeanManagerInjected.class)
+@IntegrationTest
+@SpecVersion(spec = "cdi", version = "20091101")
+(a)Packaging(PackagingType.EAR)
+public class ManagerTestEar extends AbstractJSR299Test
+{
+ @Test(groups = { "manager", "ejb3", "integration" })
+ @SpecAssertion(section = "11.3", id = "da")
+ public void testManagerLookupInJndi() throws Exception
+ {
+ BeanManager beanManager =
getInstanceByType(JndiBeanManagerInjected.class).getManagerFromJndi();
+ assert beanManager != null;
+ assert beanManager.equals(getCurrentManager());
+ }
+}
\ No newline at end of file