deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject git commit: DELTASPIKE-479 added test
Date Wed, 25 Dec 2013 16:53:49 GMT
Updated Branches:
  refs/heads/master 97bde1241 -> 8acf16e6d


DELTASPIKE-479 added test


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/8acf16e6
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/8acf16e6
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/8acf16e6

Branch: refs/heads/master
Commit: 8acf16e6d40726d54085753c49fd9cce855e1f9b
Parents: 97bde12
Author: gpetracek <gpetracek@apache.org>
Authored: Wed Dec 25 17:43:09 2013 +0100
Committer: gpetracek <gpetracek@apache.org>
Committed: Wed Dec 25 17:53:18 2013 +0100

----------------------------------------------------------------------
 ...cludeTestProjectStageEarFileDevelopment.java |  2 +-
 ...cludeTestProjectStageWarFileDevelopment.java |  2 +-
 .../BeanManagerProviderEarFileTest.java         | 45 +++++++++++++++++++
 .../api/provider/BeanManagerProviderTest.java   | 27 +++---------
 .../BeanManagerProviderWarFileTest.java         | 46 ++++++++++++++++++++
 5 files changed, 98 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/8acf16e6/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTestProjectStageEarFileDevelopment.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTestProjectStageEarFileDevelopment.java
b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTestProjectStageEarFileDevelopment.java
index 473429f..3944071 100644
--- a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTestProjectStageEarFileDevelopment.java
+++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTestProjectStageEarFileDevelopment.java
@@ -37,7 +37,7 @@ import org.junit.runner.RunWith;
  */
 @RunWith(Arquillian.class)
 @Category(EnterpriseArchiveProfileCategory.class)
-public abstract class ExcludeTestProjectStageEarFileDevelopment extends ExcludeTestProjectStageDevelopment
+public class ExcludeTestProjectStageEarFileDevelopment extends ExcludeTestProjectStageDevelopment
 {
     @Deployment
     public static EnterpriseArchive deployEar()

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/8acf16e6/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTestProjectStageWarFileDevelopment.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTestProjectStageWarFileDevelopment.java
b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTestProjectStageWarFileDevelopment.java
index 990034e..ec0a247 100644
--- a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTestProjectStageWarFileDevelopment.java
+++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTestProjectStageWarFileDevelopment.java
@@ -36,7 +36,7 @@ import org.junit.runner.RunWith;
  * Tests for {@link org.apache.deltaspike.core.api.exclude.Exclude}
  */
 @RunWith(Arquillian.class)
-public abstract class ExcludeTestProjectStageWarFileDevelopment extends ExcludeTestProjectStageDevelopment
+public class ExcludeTestProjectStageWarFileDevelopment extends ExcludeTestProjectStageDevelopment
 {
     /**
      * X TODO creating a WebArchive is only a workaround because JavaArchive cannot contain
other archives.

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/8acf16e6/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/provider/BeanManagerProviderEarFileTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/provider/BeanManagerProviderEarFileTest.java
b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/provider/BeanManagerProviderEarFileTest.java
new file mode 100644
index 0000000..9a836c5
--- /dev/null
+++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/provider/BeanManagerProviderEarFileTest.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.deltaspike.test.core.api.provider;
+
+import org.apache.deltaspike.test.category.EnterpriseArchiveProfileCategory;
+import org.apache.deltaspike.test.util.ArchiveUtils;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+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.experimental.categories.Category;
+import org.junit.runner.RunWith;
+
+@RunWith(Arquillian.class)
+@Category(EnterpriseArchiveProfileCategory.class)
+public class BeanManagerProviderEarFileTest extends BeanManagerProviderTest
+{
+    @Deployment
+    public static EnterpriseArchive deployEar()
+    {
+        String simpleName = BeanManagerProviderEarFileTest.class.getSimpleName();
+        String archiveName = simpleName.substring(0, 1).toLowerCase() + simpleName.substring(1);
+
+        return ShrinkWrap.create(EnterpriseArchive.class, archiveName + ".ear")
+                .addAsModule(BeanManagerProviderWarFileTest.deploy());
+    }
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/8acf16e6/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/provider/BeanManagerProviderTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/provider/BeanManagerProviderTest.java
b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/provider/BeanManagerProviderTest.java
index 518abcf..6fd5a86 100644
--- a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/provider/BeanManagerProviderTest.java
+++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/provider/BeanManagerProviderTest.java
@@ -18,14 +18,8 @@
 */
 package org.apache.deltaspike.test.core.api.provider;
 
-
 import org.apache.deltaspike.core.api.provider.BeanManagerProvider;
-import org.apache.deltaspike.test.util.ArchiveUtils;
-import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.asset.EmptyAsset;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -33,26 +27,15 @@ import org.junit.runner.RunWith;
 import javax.enterprise.inject.spi.BeanManager;
 
 @RunWith(Arquillian.class)
-public class BeanManagerProviderTest
+public abstract class BeanManagerProviderTest
 {
-    /**
-     *X TODO creating a WebArchive is only a workaround because JavaArchive cannot contain
other archives.
-     */
-    @Deployment
-    public static WebArchive deploy()
-    {
-        return ShrinkWrap.create(WebArchive.class, "beanManagerProvider.war")
-                .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreArchive())
-                .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
-    }
-    
     @Test
     public void testBeanManagerProvider() throws Exception
     {
-            BeanManagerProvider bmp = BeanManagerProvider.getInstance();
-            Assert.assertNotNull(bmp);
+        BeanManagerProvider bmp = BeanManagerProvider.getInstance();
+        Assert.assertNotNull(bmp);
 
-            BeanManager bm = bmp.getBeanManager();
-            Assert.assertNotNull(bm);
+        BeanManager bm = bmp.getBeanManager();
+        Assert.assertNotNull(bm);
     }
 }

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/8acf16e6/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/provider/BeanManagerProviderWarFileTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/provider/BeanManagerProviderWarFileTest.java
b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/provider/BeanManagerProviderWarFileTest.java
new file mode 100644
index 0000000..465b2e2
--- /dev/null
+++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/provider/BeanManagerProviderWarFileTest.java
@@ -0,0 +1,46 @@
+/*
+* 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.deltaspike.test.core.api.provider;
+
+import org.apache.deltaspike.test.util.ArchiveUtils;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.runner.RunWith;
+
+@RunWith(Arquillian.class)
+public class BeanManagerProviderWarFileTest extends BeanManagerProviderTest
+{
+    /**
+     *X TODO creating a WebArchive is only a workaround because JavaArchive cannot contain
other archives.
+     */
+    @Deployment
+    public static WebArchive deploy()
+    {
+        String simpleName = BeanManagerProviderWarFileTest.class.getSimpleName();
+        String archiveName = simpleName.substring(0, 1).toLowerCase() + simpleName.substring(1);
+
+        return ShrinkWrap.create(WebArchive.class, archiveName + ".war")
+                .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreArchive())
+                .addPackage(BeanManagerProviderWarFileTest.class.getPackage())
+                .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
+    }
+}


Mime
View raw message