Updated Branches: refs/heads/master 8acf16e6d -> 7dd252cd4
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/7dd252cd Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/7dd252cd Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/7dd252cd Branch: refs/heads/master Commit: 7dd252cd4f984823a28816a1c81633ff15e7b00b Parents: 8acf16e Author: gpetracek <[email protected]> Authored: Wed Dec 25 18:06:54 2013 +0100 Committer: gpetracek <[email protected]> Committed: Wed Dec 25 18:40:47 2013 +0100 ---------------------------------------------------------------------- .../test/core/api/exclude/ExcludeTest.java | 3 -- .../ExcludeTestProjectStageDevelopment.java | 3 -- .../api/provider/BeanManagerProviderTest.java | 3 -- .../BeanManagerProviderWarFileTest.java | 2 +- .../PartialBeanAsInterfaceEarFileTest.java | 42 ++++++++++++++++ .../uc001/PartialBeanAsInterfaceTest.java | 29 +---------- .../PartialBeanAsInterfaceWarFileTest.java | 51 ++++++++++++++++++++ .../core/api/partialbean/util/ArchiveUtils.java | 4 +- .../impl/src/test/resources/arquillian.xml | 4 +- 9 files changed, 100 insertions(+), 41 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/7dd252cd/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTest.java ---------------------------------------------------------------------- diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTest.java b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTest.java index f8c09ae..d457210 100644 --- a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTest.java +++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTest.java @@ -19,15 +19,12 @@ package org.apache.deltaspike.test.core.api.exclude; import org.apache.deltaspike.core.api.provider.BeanProvider; -import org.jboss.arquillian.junit.Arquillian; import org.junit.Assert; import org.junit.Test; -import org.junit.runner.RunWith; /** * Tests for {@link org.apache.deltaspike.core.api.exclude.Exclude} */ -@RunWith(Arquillian.class) public abstract class ExcludeTest { /** http://git-wip-us.apache.org/repos/asf/deltaspike/blob/7dd252cd/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTestProjectStageDevelopment.java ---------------------------------------------------------------------- diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTestProjectStageDevelopment.java b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTestProjectStageDevelopment.java index 2628a27..3dbcd92 100644 --- a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTestProjectStageDevelopment.java +++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTestProjectStageDevelopment.java @@ -20,15 +20,12 @@ package org.apache.deltaspike.test.core.api.exclude; import org.apache.deltaspike.core.api.provider.BeanProvider; -import org.jboss.arquillian.junit.Arquillian; import org.junit.Assert; import org.junit.Test; -import org.junit.runner.RunWith; /** * Tests for {@link org.apache.deltaspike.core.api.exclude.Exclude} */ -@RunWith(Arquillian.class) public abstract class ExcludeTestProjectStageDevelopment { /** http://git-wip-us.apache.org/repos/asf/deltaspike/blob/7dd252cd/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 6fd5a86..d81bc98 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 @@ -19,14 +19,11 @@ package org.apache.deltaspike.test.core.api.provider; import org.apache.deltaspike.core.api.provider.BeanManagerProvider; -import org.jboss.arquillian.junit.Arquillian; import org.junit.Assert; import org.junit.Test; -import org.junit.runner.RunWith; import javax.enterprise.inject.spi.BeanManager; -@RunWith(Arquillian.class) public abstract class BeanManagerProviderTest { @Test http://git-wip-us.apache.org/repos/asf/deltaspike/blob/7dd252cd/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 index 465b2e2..8952c35 100644 --- 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 @@ -39,8 +39,8 @@ public class BeanManagerProviderWarFileTest extends BeanManagerProviderTest String archiveName = simpleName.substring(0, 1).toLowerCase() + simpleName.substring(1); return ShrinkWrap.create(WebArchive.class, archiveName + ".war") - .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreArchive()) .addPackage(BeanManagerProviderWarFileTest.class.getPackage()) + .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreArchive()) .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml"); } } http://git-wip-us.apache.org/repos/asf/deltaspike/blob/7dd252cd/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc001/PartialBeanAsInterfaceEarFileTest.java ---------------------------------------------------------------------- diff --git a/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc001/PartialBeanAsInterfaceEarFileTest.java b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc001/PartialBeanAsInterfaceEarFileTest.java new file mode 100644 index 0000000..22b73c8 --- /dev/null +++ b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc001/PartialBeanAsInterfaceEarFileTest.java @@ -0,0 +1,42 @@ +/* + * 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.partialbean.uc001; + +import org.apache.deltaspike.test.category.EnterpriseArchiveProfileCategory; +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.spec.EnterpriseArchive; +import org.junit.experimental.categories.Category; +import org.junit.runner.RunWith; + +@RunWith(Arquillian.class) +@Category(EnterpriseArchiveProfileCategory.class) +public class PartialBeanAsInterfaceEarFileTest extends PartialBeanAsInterfaceTest +{ + @Deployment + public static EnterpriseArchive deployEar() + { + String simpleName = PartialBeanAsInterfaceEarFileTest.class.getSimpleName(); + String archiveName = simpleName.substring(0, 1).toLowerCase() + simpleName.substring(1); + + return ShrinkWrap.create(EnterpriseArchive.class, archiveName + ".ear") + .addAsModule(PartialBeanAsInterfaceWarFileTest.deploy()); + } +} http://git-wip-us.apache.org/repos/asf/deltaspike/blob/7dd252cd/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc001/PartialBeanAsInterfaceTest.java ---------------------------------------------------------------------- diff --git a/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc001/PartialBeanAsInterfaceTest.java b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc001/PartialBeanAsInterfaceTest.java index 00d4a60..8e92182 100644 --- a/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc001/PartialBeanAsInterfaceTest.java +++ b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc001/PartialBeanAsInterfaceTest.java @@ -18,43 +18,16 @@ */ package org.apache.deltaspike.test.core.api.partialbean.uc001; -import org.apache.deltaspike.test.core.api.partialbean.shared.TestPartialBeanBinding; -import org.apache.deltaspike.test.core.api.partialbean.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.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; -import org.junit.runner.RunWith; import javax.inject.Inject; -@RunWith(Arquillian.class) -public class PartialBeanAsInterfaceTest +public abstract class PartialBeanAsInterfaceTest { @Inject private PartialBean partialBean; - @Deployment - public static WebArchive war() - { - String simpleName = PartialBeanAsInterfaceTest.class.getSimpleName(); - String archiveName = simpleName.substring(0, 1).toLowerCase() + simpleName.substring(1); - - JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, archiveName + ".jar") - .addPackage(PartialBeanAsInterfaceTest.class.getPackage()) - .addPackage(TestPartialBeanBinding.class.getPackage()) - .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml"); - - return ShrinkWrap.create(WebArchive.class, archiveName + ".war") - .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreAndPartialBeanArchive()) - .addAsLibraries(testJar) - .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml"); - } - @Test public void testPartialBeanAsInterface() throws Exception { http://git-wip-us.apache.org/repos/asf/deltaspike/blob/7dd252cd/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc001/PartialBeanAsInterfaceWarFileTest.java ---------------------------------------------------------------------- diff --git a/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc001/PartialBeanAsInterfaceWarFileTest.java b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc001/PartialBeanAsInterfaceWarFileTest.java new file mode 100644 index 0000000..2400b3e --- /dev/null +++ b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc001/PartialBeanAsInterfaceWarFileTest.java @@ -0,0 +1,51 @@ +/* + * 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.partialbean.uc001; + +import org.apache.deltaspike.test.core.api.partialbean.shared.TestPartialBeanBinding; +import org.apache.deltaspike.test.core.api.partialbean.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.JavaArchive; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.runner.RunWith; + +@RunWith(Arquillian.class) +public class PartialBeanAsInterfaceWarFileTest extends PartialBeanAsInterfaceTest +{ + @Deployment + public static WebArchive deploy() + { + String simpleName = PartialBeanAsInterfaceWarFileTest.class.getSimpleName(); + String archiveName = simpleName.substring(0, 1).toLowerCase() + simpleName.substring(1); + + JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, archiveName + ".jar") + .addPackage(PartialBeanAsInterfaceWarFileTest.class.getPackage()) + .addPackage(TestPartialBeanBinding.class.getPackage()) + .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml"); + + return ShrinkWrap.create(WebArchive.class, archiveName + ".war") + .addPackage(PartialBeanAsInterfaceWarFileTest.class.getPackage()) + .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreAndPartialBeanArchive()) + .addAsLibraries(testJar) + .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml"); + } +} http://git-wip-us.apache.org/repos/asf/deltaspike/blob/7dd252cd/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/util/ArchiveUtils.java ---------------------------------------------------------------------- diff --git a/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/util/ArchiveUtils.java b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/util/ArchiveUtils.java index d70ebf4..a3bb54f 100644 --- a/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/util/ArchiveUtils.java +++ b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/util/ArchiveUtils.java @@ -35,6 +35,8 @@ public abstract class ArchiveUtils return ShrinkWrapArchiveUtil.getArchives(null, "META-INF/beans.xml", - new String[]{"org.apache.deltaspike.core", "org.apache.deltaspike.partialbean"}, excludedFiles); + new String[]{"org.apache.deltaspike.core", + "org.apache.deltaspike.test.category", + "org.apache.deltaspike.partialbean"}, excludedFiles); } } http://git-wip-us.apache.org/repos/asf/deltaspike/blob/7dd252cd/deltaspike/modules/partial-bean/impl/src/test/resources/arquillian.xml ---------------------------------------------------------------------- diff --git a/deltaspike/modules/partial-bean/impl/src/test/resources/arquillian.xml b/deltaspike/modules/partial-bean/impl/src/test/resources/arquillian.xml index d6165ac..b0d7dbf 100644 --- a/deltaspike/modules/partial-bean/impl/src/test/resources/arquillian.xml +++ b/deltaspike/modules/partial-bean/impl/src/test/resources/arquillian.xml @@ -21,9 +21,9 @@ xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> <!--Uncomment to have test archives exported to the file system for inspection --> - <engine> + <!--engine> <property name="deploymentExportPath">target/</property> - </engine> + </engine--> <container qualifier="jbossas-managed-7"> <configuration>
