You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2015/12/30 09:48:53 UTC
[3/4] tomee git commit: rework test for tomee-1689
rework test for tomee-1689
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/89bd8010
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/89bd8010
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/89bd8010
Branch: refs/heads/master
Commit: 89bd80108b227d9d41b53c42d1aabf0fdf99c8f8
Parents: 0473178
Author: Romain Manni-Bucau <rm...@gmail.com>
Authored: Wed Dec 30 09:37:48 2015 +0100
Committer: Romain Manni-Bucau <rm...@gmail.com>
Committed: Wed Dec 30 09:37:48 2015 +0100
----------------------------------------------------------------------
.../arquillian/tests/ear/BaseForEar.java | 45 ++++++++++++++++++++
.../tests/ear/EarNoTestMethodTest.java | 3 +-
2 files changed, 47 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/89bd8010/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/ear/BaseForEar.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/ear/BaseForEar.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/ear/BaseForEar.java
new file mode 100644
index 0000000..9350058
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/ear/BaseForEar.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.openejb.arquillian.tests.ear;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+
+import javax.inject.Inject;
+
+import static org.junit.Assert.assertEquals;
+
+public abstract class BaseForEar {
+ @Deployment
+ public static EnterpriseArchive createDeployment() {
+ return ShrinkWrap.create(EnterpriseArchive.class, "red.ear")
+ .addAsModule(ShrinkWrap.create(WebArchive.class, "bean.war")
+ .addClass(Bean.class).addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml"));
+ }
+
+ @Inject
+ private Bean bean;
+
+ @Test
+ public void run() {
+ assertEquals(Test.class.getName(), bean.getMessage());
+ }
+}
http://git-wip-us.apache.org/repos/asf/tomee/blob/89bd8010/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/ear/EarNoTestMethodTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/ear/EarNoTestMethodTest.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/ear/EarNoTestMethodTest.java
index cf0ccc7..8213cd0 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/ear/EarNoTestMethodTest.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/ear/EarNoTestMethodTest.java
@@ -21,5 +21,6 @@ import org.junit.runner.RunWith;
// https://issues.apache.org/jira/browse/TOMEE-1689
@RunWith(Arquillian.class)
-public class EarNoTestMethodTest extends EarTest {
+public class EarNoTestMethodTest extends BaseForEar {
+ // nothing there to ensure we still find it thanks to @RunWith
}