oleksii-novikov-onix commented on code in PR #4385:
URL: https://github.com/apache/fineract/pull/4385#discussion_r1972098448
##########
fineract-provider/src/test/java/org/apache/fineract/infrastructure/security/utils/LogParameterEscapeUtilTest.java:
##########
@@ -43,9 +46,33 @@ public LogParameterEscapeUtilTest() {
Then("The log message stays as it is", () -> {
assertEquals(logParameter, escapedLogParameter);
});
+
Then("The escape util changes the special characters to `_`", () -> {
assertEquals("This String contains new line_, carriage return_ and
tab_ characters.", escapedLogParameter);
});
}
+ // Additional JUnit 5 Test Cases
+ @Test
+ void testEscapeLogParameter_withNullInput() {
+ assertEquals(null, LogParameterEscapeUtil.escapeLogParameter(null));
Review Comment:
You can use Assertions.assertNull instead of assertEquals, this would be
more elegant 😊
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]