From 90025c5ff93950b1544a5391eab15c31393dcb35 Mon Sep 17 00:00:00 2001 From: Nidhi Date: Fri, 22 Sep 2023 15:07:08 -0700 Subject: [PATCH] ELY-2645 : Simplify assertions in testIterationAsNegativeValue method in MaskCommandTest --- .../java/org/wildfly/security/tool/MaskCommandTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tool/src/test/java/org/wildfly/security/tool/MaskCommandTest.java b/tool/src/test/java/org/wildfly/security/tool/MaskCommandTest.java index 0bec23f2cf9..ad186021938 100644 --- a/tool/src/test/java/org/wildfly/security/tool/MaskCommandTest.java +++ b/tool/src/test/java/org/wildfly/security/tool/MaskCommandTest.java @@ -164,9 +164,9 @@ public void testIterationAsNegativeValue() { String retVal = executeCommandAndCheckStatusAndGetOutput(args); String[] retValLines = retVal.split(LINE_SEPARATOR); - assertTrue("IllegalArgumentException must be present", ("java.lang.IllegalArgumentException: ELYTOOL00007: Invalid \"iteration\" value. Must be an integer between 1 and 2147483647, inclusive").equals(retValLines[0])); - assertTrue("Message about invalid iteration parameter must be present", ("Invalid \"iteration\" parameter. Default value \"" + defaultIteration + "\" will be used.").equals(retValLines[1])); - assertTrue("Output has to be the as pre-generated one", ("MASK-" + pregenerated + ";" + salt + ";" + defaultIteration).equals(retValLines[2])); + assertEquals("IllegalArgumentException must be present", "java.lang.IllegalArgumentException: ELYTOOL00007: Invalid \"iteration\" value. Must be an integer between 1 and 2147483647, inclusive",retValLines[0]); + assertEquals("Message about invalid iteration parameter must be present", "Invalid \"iteration\" parameter. Default value \"" + defaultIteration + "\" will be used.",retValLines[1]); + assertEquals("Output has to be the as pre-generated one", "MASK-" + pregenerated + ";" + salt + ";" + defaultIteration, retValLines[2]); } @Test