Skip to content

Commit

Permalink
ELY-2642:Simplify assertion in testMissingIteration method
Browse files Browse the repository at this point in the history
  • Loading branch information
Nidhi committed Sep 22, 2023
1 parent fd18d21 commit 2ffb7e6
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
package org.wildfly.security.tool;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.wildfly.security.tool.Params.LINE_SEPARATOR;

Expand Down Expand Up @@ -80,8 +81,9 @@ public void testMissingIteration() {
String retVal = executeCommandAndCheckStatusAndGetOutput(args);
String[] retValLines = retVal.split(LINE_SEPARATOR);

assertTrue("Message about invalid iteration parameter must be present", ("Invalid \"iteration\" parameter. Default value \"" + defaultIteration + "\" will be used.").equals(retValLines[0]));
assertTrue("Output has to be the as pre-generated one", ("MASK-" + pregenerated + ";" + salt + ";" + defaultIteration).equals(retValLines[1]));
assertEquals("Message about invalid iteration parameter must be present", "Invalid \"iteration\" parameter. Default value \"" + defaultIteration + "\" will be used.",
retValLines[0]);
assertEquals("Output has to be the as pre-generated one", "MASK-" + pregenerated + ";" + salt + ";" + defaultIteration, retValLines[1]);
}

@Test
Expand Down

0 comments on commit 2ffb7e6

Please sign in to comment.