tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1504499 - in /tomee/tomee/trunk/container/openejb-loader/src: main/java/org/apache/openejb/loader/ProvisioningUtil.java test/java/org/apache/openejb/loader/ProvisioningUtilTest.java
Date Thu, 18 Jul 2013 15:24:40 GMT
Author: rmannibucau
Date: Thu Jul 18 15:24:39 2013
New Revision: 1504499

URL: http://svn.apache.org/r1504499
Log:
adding a quick test for ProvisioningUtil.quickMvnUrl

Added:
    tomee/tomee/trunk/container/openejb-loader/src/test/java/org/apache/openejb/loader/ProvisioningUtilTest.java
Modified:
    tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/ProvisioningUtil.java

Modified: tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/ProvisioningUtil.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/ProvisioningUtil.java?rev=1504499&r1=1504498&r2=1504499&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/ProvisioningUtil.java
(original)
+++ tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/ProvisioningUtil.java
Thu Jul 18 15:24:39 2013
@@ -154,7 +154,7 @@ public class ProvisioningUtil {
         return rawLocation;
     }
 
-    private static String quickMvnUrl(final String raw) throws MalformedURLException {
+    public static String quickMvnUrl(final String raw) throws MalformedURLException {
         final String base;
         if (raw.contains("-SNAPSHOT") && raw.contains("apache")) {
             base = APACHE_SNAPSHOT;

Added: tomee/tomee/trunk/container/openejb-loader/src/test/java/org/apache/openejb/loader/ProvisioningUtilTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-loader/src/test/java/org/apache/openejb/loader/ProvisioningUtilTest.java?rev=1504499&view=auto
==============================================================================
--- tomee/tomee/trunk/container/openejb-loader/src/test/java/org/apache/openejb/loader/ProvisioningUtilTest.java
(added)
+++ tomee/tomee/trunk/container/openejb-loader/src/test/java/org/apache/openejb/loader/ProvisioningUtilTest.java
Thu Jul 18 15:24:39 2013
@@ -0,0 +1,31 @@
+/*
+ * 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.loader;
+
+import org.junit.Test;
+
+import java.net.MalformedURLException;
+
+import static org.junit.Assert.assertEquals;
+
+public class ProvisioningUtilTest {
+    @Test
+    public void mvnUrl() throws MalformedURLException {
+        final String url = ProvisioningUtil.quickMvnUrl("org.apache.openejb/apache-tomee/x.y.z-SNAPSHOT");
+        assertEquals("https://repository.apache.org/snapshots/org/apache/openejb/apache-tomee/x.y.z-SNAPSHOT/apache-tomee-x.y.z-SNAPSHOT.jar",
url);
+    }
+}



Mime
View raw message