Rick

Not sure if you meant to commit this as part of this change - it wasn't mentioned in the commit message at all.

Jervis,

Another way to handle spaces in the URL which might be a little simpler is:

Index: core/src/test/java/org/apache/tuscany/core/services/artifact/ LocalMavenRepositoryTestCase.java
===================================================================
--- core/src/test/java/org/apache/tuscany/core/services/artifact/ LocalMavenRepositoryTestCase.java (revision 428735) +++ core/src/test/java/org/apache/tuscany/core/services/artifact/ LocalMavenRepositoryTestCase.java (working copy)
@@ -17,7 +17,6 @@
package org.apache.tuscany.core.services.artifact;
import java.io.File;
-import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
@@ -27,7 +26,7 @@
/**
* This testcase assumes that there is a maven repo in the default location.
- *
+ *
  * @version $Rev$ $Date$
  */
public class LocalMavenRepositoryTestCase extends TestCase {
@@ -43,11 +42,11 @@
assertEquals("org/apache/tuscany/spi/1.0-SNAPSHOT/spi-1.0- SNAPSHOT-x86.jar", repo.getPath(artifact));
     }
- public void testArtifactFoundInRepo() throws MalformedURLException, UnsupportedEncodingException { + public void testArtifactFoundInRepo() throws MalformedURLException {
         String home = System.getProperty("user.home");
File file = new File(home, ".m2/repository/org/apache/ tuscany/spi/1.0-SNAPSHOT/spi-1.0-SNAPSHOT.jar");
         repo.resolve(artifact);
- assertEquals(file.toURL().toString(), java.net.URLDecoder.decode(artifact.getUrl().toString(), "UTF-8"));
+        assertEquals(file.toURI().toURL(), artifact.getUrl());
     }
public void testArtifactNotFoundInRepo() throws MalformedURLException {


--
Jeremy

On Aug 4, 2006, at 7:07 AM, [EMAIL PROTECTED] wrote:
Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/ tuscany/core/services/artifact/LocalMavenRepositoryTestCase.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/core/ src/test/java/org/apache/tuscany/core/services/artifact/ LocalMavenRepositoryTestCase.java? rev=428730&r1=428729&r2=428730&view=diff ====================================================================== ======== --- incubator/tuscany/java/sca/core/src/test/java/org/apache/ tuscany/core/services/artifact/LocalMavenRepositoryTestCase.java (original) +++ incubator/tuscany/java/sca/core/src/test/java/org/apache/ tuscany/core/services/artifact/LocalMavenRepositoryTestCase.java Fri Aug 4 07:07:08 2006
@@ -17,6 +17,7 @@
 package org.apache.tuscany.core.services.artifact;

 import java.io.File;
+import java.io.UnsupportedEncodingException;
 import java.net.MalformedURLException;
 import java.net.URL;

@@ -42,11 +43,11 @@
assertEquals("org/apache/tuscany/spi/1.0-SNAPSHOT/spi-1.0- SNAPSHOT-x86.jar", repo.getPath(artifact));
     }

- public void testArtifactFoundInRepo() throws MalformedURLException { + public void testArtifactFoundInRepo() throws MalformedURLException, UnsupportedEncodingException {
         String home = System.getProperty("user.home");
File file = new File(home, ".m2/repository/org/apache/ tuscany/spi/1.0-SNAPSHOT/spi-1.0-SNAPSHOT.jar");
         repo.resolve(artifact);
-        assertEquals(file.toURL(), artifact.getUrl());
+ assertEquals(file.toURL().toString(), java.net.URLDecoder.decode(artifact.getUrl().toString(), "UTF-8"));
     }

public void testArtifactNotFoundInRepo() throws MalformedURLException {

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to