From 9ba6af34586f00be38802ad32facd2c6b9b0b3ef Mon Sep 17 00:00:00 2001 From: Dominik Przybysz Date: Sun, 1 Oct 2017 19:38:15 +0000 Subject: [PATCH] [MAINTENANCE] Refactor tests in BMP git-svn-id: https://svn.apache.org/repos/asf/aries/trunk@1810274 13f79535-47bb-0310-9956-ffa450edef68 --- .../MyFactoryBeanAsService.java | 12 +++++++----- .../ServiceWithRanking.java | 3 ++- .../ServiceWithTypedParameters.java | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) rename blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/{ => osgiserviceprovider}/MyFactoryBeanAsService.java (87%) rename blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/{ => osgiserviceprovider}/ServiceWithRanking.java (90%) rename blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/{ => osgiserviceprovider}/ServiceWithTypedParameters.java (95%) diff --git a/blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/MyFactoryBeanAsService.java b/blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/osgiserviceprovider/MyFactoryBeanAsService.java similarity index 87% rename from blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/MyFactoryBeanAsService.java rename to blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/osgiserviceprovider/MyFactoryBeanAsService.java index 297ff9ca6f..180c1601e1 100644 --- a/blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/MyFactoryBeanAsService.java +++ b/blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/osgiserviceprovider/MyFactoryBeanAsService.java @@ -16,8 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.aries.blueprint.plugin.test; +package org.apache.aries.blueprint.plugin.test.osgiserviceprovider; +import org.apache.aries.blueprint.plugin.test.MyProduced; +import org.apache.aries.blueprint.plugin.test.ServiceA; import org.ops4j.pax.cdi.api.OsgiServiceProvider; import org.ops4j.pax.cdi.api.Properties; import org.ops4j.pax.cdi.api.Property; @@ -33,21 +35,21 @@ public class MyFactoryBeanAsService { @Named("producedForService") @OsgiServiceProvider public MyProduced createBeanWithServiceExpose1() { - return new MyProduced("My message"); + return null; } @Produces @Named("producedForServiceWithOneInterface") @OsgiServiceProvider(classes = MyProduced.class) public MyProduced createBeanWithServiceExpose2() { - return new MyProduced("My message"); + return null; } @Produces @Named("producedForServiceWithTwoInterfaces") @OsgiServiceProvider(classes = {MyProduced.class, ServiceA.class}) public MyProduced createBeanWithServiceExpose3() { - return new MyProduced("My message"); + return null; } @Produces @@ -59,6 +61,6 @@ public MyProduced createBeanWithServiceExpose3() { @Property(name = "service.ranking", value = "100") }) public MyProduced createBeanWithServiceExpose4() { - return new MyProduced("My message"); + return null; } } diff --git a/blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/ServiceWithRanking.java b/blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/osgiserviceprovider/ServiceWithRanking.java similarity index 90% rename from blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/ServiceWithRanking.java rename to blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/osgiserviceprovider/ServiceWithRanking.java index aa287df305..c5591f8534 100644 --- a/blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/ServiceWithRanking.java +++ b/blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/osgiserviceprovider/ServiceWithRanking.java @@ -16,8 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.aries.blueprint.plugin.test; +package org.apache.aries.blueprint.plugin.test.osgiserviceprovider; +import org.apache.aries.blueprint.plugin.test.ServiceA; import org.ops4j.pax.cdi.api.OsgiServiceProvider; import org.ops4j.pax.cdi.api.Properties; import org.ops4j.pax.cdi.api.Property; diff --git a/blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/ServiceWithTypedParameters.java b/blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/osgiserviceprovider/ServiceWithTypedParameters.java similarity index 95% rename from blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/ServiceWithTypedParameters.java rename to blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/osgiserviceprovider/ServiceWithTypedParameters.java index b29d7a012f..93fc50f74a 100644 --- a/blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/ServiceWithTypedParameters.java +++ b/blueprint/plugin/blueprint-maven-plugin/src/test/java/org/apache/aries/blueprint/plugin/test/osgiserviceprovider/ServiceWithTypedParameters.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.aries.blueprint.plugin.test; +package org.apache.aries.blueprint.plugin.test.osgiserviceprovider; import org.ops4j.pax.cdi.api.OsgiServiceProvider; import org.ops4j.pax.cdi.api.Properties;