From 7d80f0efea5a3fb778da65317c65fec8efa633d3 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 18 Jun 2015 17:01:09 +0100 Subject: [PATCH] Update tests so that they also work on Windows See gh-3274 --- ...rapeRootRepositorySystemSessionAutoConfigurationTests.java | 4 +++- ...tingsXmlRepositorySystemSessionAutoConfigurationTests.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/GrapeRootRepositorySystemSessionAutoConfigurationTests.java b/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/GrapeRootRepositorySystemSessionAutoConfigurationTests.java index 64fcad630e..87dededf9a 100644 --- a/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/GrapeRootRepositorySystemSessionAutoConfigurationTests.java +++ b/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/GrapeRootRepositorySystemSessionAutoConfigurationTests.java @@ -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 { diff --git a/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfigurationTests.java b/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfigurationTests.java index 94db7c64f4..5dbf1cdfd8 100644 --- a/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfigurationTests.java +++ b/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfigurationTests.java @@ -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) {