Skip to content

Commit 2b06d13

Browse files
Adjust test-case for log4j2 custom fields
Test numerical valued custom field as well. Signed-off-by: Karsten Schnitter <[email protected]>
1 parent 2a37cc5 commit 2b06d13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cf-java-logging-support-log4j2/src/test/java/com/sap/hcp/cf/log4j2/layout/suppliers/EventContextFieldSupplierTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ public void customFields() throws Exception {
5353
Object[] arguments = new Object[] { //
5454
new Object(), //
5555
CustomField.customField("key", "value"), //
56-
CustomField.customField("this", "that") };
56+
CustomField.customField("this", Double.valueOf(123.456d)) };
5757
when(event.getMessage().getParameters()).thenReturn(arguments);
5858

5959
Map<String, Object> fields = fieldSupplier.map(event);
6060
assertThat(fields, hasEntry("key", "value"));
61-
assertThat(fields, hasEntry("this", "that"));
61+
assertThat(fields, hasEntry("this", Double.valueOf(123.456d)));
6262
}
6363

6464
@Test

0 commit comments

Comments
 (0)