You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kh...@apache.org on 2017/10/13 14:26:30 UTC

[geode] branch develop updated: GEODE-3826: Use system independent expected strings

This is an automated email from the ASF dual-hosted git repository.

khowe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 0814791  GEODE-3826: Use system independent expected strings
0814791 is described below

commit 0814791dc20467778dec704d4b0571e02c01295a
Author: Ken Howe <kh...@pivotal.io>
AuthorDate: Thu Oct 12 14:53:49 2017 -0700

    GEODE-3826: Use system independent expected strings
    
    Replace explicit newline in expected strings with
    SystemUtils.LINE_SEPARATOR so tests can run on Windows
---
 .../geode/management/internal/cli/result/CommandResultTest.java   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/result/CommandResultTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/result/CommandResultTest.java
index 6f9a865..579d081 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/result/CommandResultTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/result/CommandResultTest.java
@@ -14,6 +14,7 @@
  */
 package org.apache.geode.management.internal.cli.result;
 
+import static org.apache.commons.lang.SystemUtils.LINE_SEPARATOR;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import java.nio.file.Path;
@@ -39,7 +40,7 @@ public class CommandResultTest {
   public void resultWithOneLineHasOneLine() {
     CommandResult commandResult = new CommandResult(new InfoResultData("oneLine"));
 
-    assertThat(commandResult.nextLine()).isEqualTo("oneLine\n");
+    assertThat(commandResult.nextLine()).isEqualTo("oneLine" + LINE_SEPARATOR);
     assertThat(commandResult.hasNextLine()).isFalse();
   }
 
@@ -50,7 +51,8 @@ public class CommandResultTest {
     resultData.addLine("lineTwo");
     CommandResult commandResult = new CommandResult(resultData);
 
-    assertThat(commandResult.nextLine()).isEqualTo("lineOne\nlineTwo\n");
+    assertThat(commandResult.nextLine())
+        .isEqualTo("lineOne" + LINE_SEPARATOR + "lineTwo" + LINE_SEPARATOR);
     assertThat(commandResult.hasNextLine()).isFalse();
   }
 
@@ -67,7 +69,7 @@ public class CommandResultTest {
     CommandResult commandResult = new CommandResult(fileToDownload);
 
     assertThat(commandResult.hasFileToDownload()).isTrue();
-    assertThat(commandResult.nextLine()).isEqualTo(fileToDownload.toString() + '\n');
+    assertThat(commandResult.nextLine()).isEqualTo(fileToDownload.toString() + LINE_SEPARATOR);
     assertThat(commandResult.getFileToDownload()).isEqualTo(fileToDownload);
   }
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].