Update tests so that they also work on Windows

See gh-3274
pull/3885/head
Andy Wilkinson 10 years ago
parent 4d0996b1bd
commit 7d80f0efea

@ -16,6 +16,8 @@
package org.springframework.boot.cli.compiler.grape;
import java.io.File;
import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
import org.eclipse.aether.DefaultRepositorySystemSession;
import org.eclipse.aether.RepositorySystem;
@ -103,7 +105,7 @@ public class GrapeRootRepositorySystemSessionAutoConfigurationTests {
assertThat(this.session.getLocalRepository(), is(notNullValue()));
assertThat(this.session.getLocalRepository().getBasedir().getAbsolutePath(),
endsWith("/foo/repository"));
endsWith(File.separatorChar + "foo" + File.separatorChar + "repository"));
}
private class LocalRepositoryManagerAnswer implements Answer<LocalRepositoryManager> {

@ -16,6 +16,8 @@
package org.springframework.boot.cli.compiler.grape;
import java.io.File;
import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
import org.apache.maven.settings.building.SettingsBuildingException;
import org.eclipse.aether.DefaultRepositorySystemSession;
@ -98,7 +100,7 @@ public class SettingsXmlRepositorySystemSessionAutoConfigurationTests {
}
assertThat(session.getLocalRepository().getBasedir().getAbsolutePath(),
endsWith("/bar/repository"));
endsWith(File.separatorChar + "bar" + File.separatorChar + "repository"));
}
private void assertSessionCustomization(String userHome) {

Loading…
Cancel
Save