tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meer...@apache.org
Subject svn commit: r449382 - /incubator/tuscany/java/sca/services/maven/src/test/java/org/apache/tuscany/services/maven/MavenArtifactRepositoryTest.java
Date Sun, 24 Sep 2006 09:50:11 GMT
Author: meerajk
Date: Sun Sep 24 02:50:10 2006
New Revision: 449382

URL: http://svn.apache.org/viewvc?view=rev&rev=449382
Log:
Adding more tests.

Modified:
    incubator/tuscany/java/sca/services/maven/src/test/java/org/apache/tuscany/services/maven/MavenArtifactRepositoryTest.java

Modified: incubator/tuscany/java/sca/services/maven/src/test/java/org/apache/tuscany/services/maven/MavenArtifactRepositoryTest.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/maven/src/test/java/org/apache/tuscany/services/maven/MavenArtifactRepositoryTest.java?view=diff&rev=449382&r1=449381&r2=449382
==============================================================================
--- incubator/tuscany/java/sca/services/maven/src/test/java/org/apache/tuscany/services/maven/MavenArtifactRepositoryTest.java
(original)
+++ incubator/tuscany/java/sca/services/maven/src/test/java/org/apache/tuscany/services/maven/MavenArtifactRepositoryTest.java
Sun Sep 24 02:50:10 2006
@@ -18,11 +18,12 @@
  */
 package org.apache.tuscany.services.maven;
 
-
+import java.io.File;
 import java.net.URL;
 import java.util.Set;
 
 import org.apache.tuscany.spi.services.artifact.Artifact;
+import org.apache.tuscany.spi.services.info.RuntimeInfo;
 
 import junit.framework.TestCase;
 
@@ -47,22 +48,25 @@
     /*
      * Test method for 'org.apache.tuscany.services.maven.MavenArtifactRepository.resolve(Artifact)'
      */
-    public void testResolveArtifact() {
-        
-        String[] remoteRepoUrls = {"http://repo1.maven.org/maven2/"};
-        MavenArtifactRepository repository = new MavenArtifactRepository(remoteRepoUrls,
null);
+    public void testResolveArtifact() throws Exception {
+
+        final URL BASE_URL = new File(System.getProperty("user.home") + File.separator +
"m2").toURL();
+        String[] remoteRepoUrls = { "http://repo1.maven.org/maven2/" };
+        MavenArtifactRepository repository = new MavenArtifactRepository(remoteRepoUrls,
new RuntimeInfo() {
+            public File getApplicationRootDirectory() { return null; }
+            public URL getBaseURL() { return BASE_URL; }
+            public File getInstallDirectory() { return null; }
+        });
         Artifact artifact = new Artifact();
         artifact.setGroup("org.apache.maven");
         artifact.setName("maven-artifact");
         artifact.setVersion("2.0.4");
         artifact.setType("jar");
-        
+
         repository.resolve(artifact);
-        
+
         Set<URL> urls = artifact.getUrls();
         assertEquals(2, urls.size());
-        
-        
 
     }
 
@@ -70,7 +74,6 @@
      * Test method for 'org.apache.tuscany.services.maven.MavenArtifactRepository.resolve(Collection<?
extends Artifact>)'
      */
     public void testResolveCollectionOfQextendsArtifact() {
-        
 
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message