From 16314f906c9b9eb5b0904a20e1ed436c00c44e5a Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Mon, 16 Jul 2012 11:44:06 -0400 Subject: [PATCH] Made scriptbuilder tests compatible with Windows --- .../statements/login/AdminAccessBuilderSpecTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scriptbuilder/src/test/java/org/jclouds/scriptbuilder/statements/login/AdminAccessBuilderSpecTest.java b/scriptbuilder/src/test/java/org/jclouds/scriptbuilder/statements/login/AdminAccessBuilderSpecTest.java index cc60c91404..d2c0f316c2 100644 --- a/scriptbuilder/src/test/java/org/jclouds/scriptbuilder/statements/login/AdminAccessBuilderSpecTest.java +++ b/scriptbuilder/src/test/java/org/jclouds/scriptbuilder/statements/login/AdminAccessBuilderSpecTest.java @@ -19,11 +19,13 @@ package org.jclouds.scriptbuilder.statements.login; +import static java.lang.String.format; import static org.jclouds.scriptbuilder.statements.login.AdminAccessBuilderSpec.parse; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; import static org.testng.Assert.fail; +import java.io.File; import java.lang.reflect.Field; import javax.inject.Provider; @@ -104,7 +106,7 @@ public class AdminAccessBuilderSpecTest { public void testParsePrivateKeyFile() { AdminAccessBuilderSpec spec = parse("adminPrivateKeyFile=target/test-classes/test"); - assertEquals(spec.getAdminPrivateKeyFile().getPath(), "target/test-classes/test"); + assertEquals(spec.getAdminPrivateKeyFile().getPath(), format("target%stest-classes%stest", File.separator, File.separator)); assertNull(spec.adminHome); assertNull(spec.adminPassword); assertNull(spec.adminPublicKeyFile);