cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject cxf git commit: Simplify test
Date Thu, 27 Nov 2014 15:16:23 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 2e0c207de -> ab4eaac0b


Simplify test


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

Branch: refs/heads/master
Commit: ab4eaac0be87291b7f053d144dc8fbf9d98634c3
Parents: 2e0c207
Author: Christian Schneider <chris@die-schneider.net>
Authored: Thu Nov 27 15:55:12 2014 +0100
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Thu Nov 27 16:16:07 2014 +0100

----------------------------------------------------------------------
 .../cxf/osgi/itests/NoAriesBlueprintTest.java   | 35 +++++++++++---------
 .../apache/cxf/osgi/itests/OSGiTestSupport.java |  5 +++
 2 files changed, 25 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/ab4eaac0/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/NoAriesBlueprintTest.java
----------------------------------------------------------------------
diff --git a/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/NoAriesBlueprintTest.java
b/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/NoAriesBlueprintTest.java
index 58f5e22..1bf2ae5 100644
--- a/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/NoAriesBlueprintTest.java
+++ b/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/NoAriesBlueprintTest.java
@@ -18,9 +18,9 @@
  */
 package org.apache.cxf.osgi.itests;
 
+
 import org.junit.Test;
 import org.junit.runner.RunWith;
-
 import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
@@ -28,8 +28,9 @@ import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
 import org.ops4j.pax.exam.spi.reactors.PerClass;
 
 import static org.ops4j.pax.exam.CoreOptions.junitBundles;
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+import static org.ops4j.pax.exam.CoreOptions.when;
+
 
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerClass.class)
@@ -48,21 +49,25 @@ public class NoAriesBlueprintTest extends OSGiTestSupport {
 
     @Configuration
     public Option[] config() {
+        String localRepo = System.getProperty("localRepository");
+        if (localRepo == null) {
+            localRepo = "";
+        }
+
         return new Option[]{
                 systemProperty("java.awt.headless").value("true"),
-                systemProperty("org.ops4j.pax.url.mvn.localRepository")
-                    .value(System.getProperty("localRepository")),
-                mavenBundle().groupId("org.apache.ws.xmlschema").artifactId("xmlschema-core").versionAsInProject(),
-                mavenBundle().groupId("org.apache.cxf").artifactId("cxf-core").versionAsInProject(),
-                mavenBundle().groupId("org.apache.servicemix.bundles")
-                    .artifactId("org.apache.servicemix.bundles.wsdl4j").versionAsInProject(),
-                mavenBundle().groupId("org.apache.cxf").artifactId("cxf-rt-wsdl").versionAsInProject(),
-                mavenBundle().groupId("org.apache.cxf").artifactId("cxf-rt-databinding-jaxb").versionAsInProject(),
-                mavenBundle().groupId("org.apache.cxf").artifactId("cxf-rt-bindings-xml").versionAsInProject(),
-                mavenBundle().groupId("org.apache.cxf").artifactId("cxf-rt-bindings-soap").versionAsInProject(),
-                mavenBundle().groupId("org.apache.cxf").artifactId("cxf-rt-frontend-simple").versionAsInProject(),
-                mavenBundle().groupId("org.apache.cxf").artifactId("cxf-rt-transports-http").versionAsInProject(),
-                mavenBundle().groupId("org.apache.cxf").artifactId("cxf-rt-frontend-jaxws").versionAsInProject(),
+                when(!"".equals(localRepo))
+                    .useOptions(systemProperty("org.ops4j.pax.url.mvn.localRepository").value(localRepo)),
+                mvnBundle("org.apache.ws.xmlschema", "xmlschema-core"),
+                mvnBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.wsdl4j"),
+                mvnBundle("org.apache.cxf", "cxf-core"),
+                mvnBundle("org.apache.cxf", "cxf-rt-wsdl"),
+                mvnBundle("org.apache.cxf", "cxf-rt-databinding-jaxb"),
+                mvnBundle("org.apache.cxf", "cxf-rt-bindings-xml"),
+                mvnBundle("org.apache.cxf", "cxf-rt-bindings-soap"),
+                mvnBundle("org.apache.cxf", "cxf-rt-frontend-simple"),
+                mvnBundle("org.apache.cxf", "cxf-rt-transports-http"),
+                mvnBundle("org.apache.cxf", "cxf-rt-frontend-jaxws"),
                 junitBundles()
         };
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/ab4eaac0/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/OSGiTestSupport.java
----------------------------------------------------------------------
diff --git a/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/OSGiTestSupport.java
b/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/OSGiTestSupport.java
index 933348a..5d842ff 100644
--- a/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/OSGiTestSupport.java
+++ b/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/OSGiTestSupport.java
@@ -23,6 +23,8 @@ package org.apache.cxf.osgi.itests;
 import javax.inject.Inject;
 
 import org.junit.Assert;
+import org.ops4j.pax.exam.CoreOptions;
+import org.ops4j.pax.exam.options.MavenArtifactProvisionOption;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 
@@ -49,4 +51,7 @@ public class OSGiTestSupport {
         return null;
     }
 
+    public MavenArtifactProvisionOption mvnBundle(String groupId, String artifactId) {
+        return CoreOptions.mavenBundle().groupId(groupId).artifactId(artifactId).versionAsInProject();
+    }
 }


Mime
View raw message