aboutsummaryrefslogtreecommitdiffstats
path: root/auth/cli-editor/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'auth/cli-editor/src/test/java')
-rw-r--r--auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/FileMacroTest.java8
-rw-r--r--auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/LogicBlockTest.java2
2 files changed, 7 insertions, 3 deletions
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/FileMacroTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/FileMacroTest.java
index d407e5a4e..443727236 100644
--- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/FileMacroTest.java
+++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/FileMacroTest.java
@@ -46,6 +46,8 @@ class FileMacroTest {
private File tempModelFile;
private File tempLogFile;
+ private static final String WHITESPACE_REGEX = "(\\s+){1,4}";
+
/**
* Creates the temp files.
*
@@ -101,11 +103,13 @@ class FileMacroTest {
final File outputLogFile = new File(tempLogFile.getCanonicalPath());
final String outputLogString = TextFileUtils.getTextFileAsString(outputLogFile.getCanonicalPath())
- .replace(Paths.get("").toAbsolutePath() + File.separator, "").replaceAll("\\s+", "");
+ .replace(Paths.get("").toAbsolutePath() + File.separator, "")
+ .replaceAll(WHITESPACE_REGEX, "");
// We compare the log to what we expect to get
final String outputLogCompareString = TextFileUtils
- .getTextFileAsString("src/test/resources/compare/FileMacro_Compare.log").replaceAll("\\s+", "");
+ .getTextFileAsString("src/test/resources/compare/FileMacro_Compare.log")
+ .replaceAll(WHITESPACE_REGEX, "");
// Check what we got is what we expected to get
assertEquals(outputLogCompareString, outputLogString);
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/LogicBlockTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/LogicBlockTest.java
index e30780ca0..982d5195e 100644
--- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/LogicBlockTest.java
+++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/LogicBlockTest.java
@@ -96,7 +96,7 @@ class LogicBlockTest {
writtenModel.getKeyInformation().getKeyInfoMap().clear();
compareModel.getKeyInformation().getKeyInfoMap().clear();
- assertEquals(writtenModel, compareModel);
+ assertEquals(compareModel, writtenModel);
}
/**