MRM-1000 - AdministrationServiceImplTest fails on Windows. Thankyou Martin Cooper for sending this patch.

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@713649 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James William Dumay 2008-11-13 05:59:08 +00:00
parent ae5ec2bfeb
commit 4e6e67b4d6
1 changed files with 20 additions and 12 deletions

View File

@ -899,30 +899,38 @@ public class AdministrationServiceImplTest
MockControl pathParserControl, PathParser parser ) MockControl pathParserControl, PathParser parser )
throws LayoutException throws LayoutException
{ {
fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( "org.apache.archiva/poms/archiva-test-1.0.pom" ), true ); String sep = File.separator;
fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( "org.apache.archiva/poms/archiva-test-1.1.pom" ), true ); String ad10p = "org.apache.archiva" + sep + "poms" + sep + "archiva-diff-1.0.pom";
fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( "org.apache.archiva/poms/archiva-diff-1.0.pom" ), true ); String at10p = "org.apache.archiva" + sep + "poms" + sep + "archiva-test-1.0.pom";
fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( "org.apache.archiva/jars/archiva-diff-1.0.jar" ), true ); String at11p = "org.apache.archiva" + sep + "poms" + sep + "archiva-test-1.1.pom";
fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( "org.apache.archiva/jars/archiva-test-1.0.jar" ), true ); String ad10j = "org.apache.archiva" + sep + "jars" + sep + "archiva-diff-1.0.jar";
fileTypesControl.expectAndReturn( fileTypes.matchesArtifactPattern( "org.apache.archiva/jars/archiva-test-1.1.jar" ), true ); 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"); 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"); 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"); 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"); 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"); 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"); 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() private List<ArchivaArtifact> getArtifacts()