]> source.dussan.org Git - archiva.git/commitdiff
MRM-1000 - AdministrationServiceImplTest fails on Windows. Thankyou Martin Cooper...
authorJames William Dumay <jdumay@apache.org>
Thu, 13 Nov 2008 05:59:08 +0000 (05:59 +0000)
committerJames William Dumay <jdumay@apache.org>
Thu, 13 Nov 2008 05:59:08 +0000 (05:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@713649 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImplTest.java

index a7f85f7e13a03646d0ce491dc699fa746c4739b0..7c0a4a17eb9560dc87befa49ef38a866ed94572c 100644 (file)
@@ -899,30 +899,38 @@ public class AdministrationServiceImplTest
                                                    MockControl pathParserControl, PathParser parser )
         throws LayoutException
     {
-        fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( "org.apache.archiva/poms/archiva-test-1.0.pom" ), true );
-        fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( "org.apache.archiva/poms/archiva-test-1.1.pom" ), true );
-        fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( "org.apache.archiva/poms/archiva-diff-1.0.pom" ), true );
-        fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( "org.apache.archiva/jars/archiva-diff-1.0.jar" ), true );
-        fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( "org.apache.archiva/jars/archiva-test-1.0.jar" ), true );
-        fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( "org.apache.archiva/jars/archiva-test-1.1.jar" ), true );
+               String sep = File.separator;
+               String ad10p = "org.apache.archiva" + sep + "poms" + sep + "archiva-diff-1.0.pom";
+               String at10p = "org.apache.archiva" + sep + "poms" + sep + "archiva-test-1.0.pom";
+               String at11p = "org.apache.archiva" + sep + "poms" + sep + "archiva-test-1.1.pom";
+               String ad10j = "org.apache.archiva" + sep + "jars" + sep + "archiva-diff-1.0.jar";
+               String at10j = "org.apache.archiva" + sep + "jars" + sep + "archiva-test-1.0.jar";
+               String at11j = "org.apache.archiva" + sep + "jars" + sep + "archiva-test-1.1.jar";
+
+        fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( at10p ), true );
+        fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( at11p ), true );
+        fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( ad10p ), true );
+        fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( ad10j ), true );
+        fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( at10j ), true );
+        fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( at11j ), true );
         
         ArtifactReference aRef = createArtifactReference("archiva-test", "org.apache.archiva", "1.1", "pom");
-        pathParserControl.expectAndReturn( parser.toArtifactReference( "org.apache.archiva/poms/archiva-test-1.1.pom" ), aRef );
+        pathParserControl.expectAndReturn( parser.toArtifactReference( at11p ), aRef );
         
         aRef = createArtifactReference("archiva-test", "org.apache.archiva", "1.0", "pom");                
-        pathParserControl.expectAndReturn( parser.toArtifactReference( "org.apache.archiva/poms/archiva-test-1.0.pom" ), aRef );
+        pathParserControl.expectAndReturn( parser.toArtifactReference( at10p ), aRef );
         
         aRef = createArtifactReference("archiva-diff", "org.apache.archiva", "1.0", "pom");
-        pathParserControl.expectAndReturn( parser.toArtifactReference( "org.apache.archiva/poms/archiva-diff-1.0.pom" ), aRef );
+        pathParserControl.expectAndReturn( parser.toArtifactReference( ad10p ), aRef );
         
         aRef = createArtifactReference("archiva-diff", "org.apache.archiva", "1.0", "jar");                
-        pathParserControl.expectAndReturn( parser.toArtifactReference( "org.apache.archiva/jars/archiva-diff-1.0.jar" ), aRef );
+        pathParserControl.expectAndReturn( parser.toArtifactReference( ad10j ), aRef );
         
         aRef = createArtifactReference("archiva-test", "org.apache.archiva", "1.0", "jar");
-        pathParserControl.expectAndReturn( parser.toArtifactReference( "org.apache.archiva/jars/archiva-test-1.0.jar" ), aRef );
+        pathParserControl.expectAndReturn( parser.toArtifactReference( at10j ), aRef );
         
         aRef = createArtifactReference("archiva-test", "org.apache.archiva", "1.1", "jar");
-        pathParserControl.expectAndReturn( parser.toArtifactReference( "org.apache.archiva/jars/archiva-test-1.1.jar" ), aRef );
+        pathParserControl.expectAndReturn( parser.toArtifactReference( at11j ), aRef );
     }
     
     private List<ArchivaArtifact> getArtifacts()