diff --git a/spring-core/src/test/java/org/springframework/aot/nativex/BasicJsonWriterTests.java b/spring-core/src/test/java/org/springframework/aot/nativex/BasicJsonWriterTests.java index 5c401340a1..db5e23d2cd 100644 --- a/spring-core/src/test/java/org/springframework/aot/nativex/BasicJsonWriterTests.java +++ b/spring-core/src/test/java/org/springframework/aot/nativex/BasicJsonWriterTests.java @@ -45,7 +45,7 @@ class BasicJsonWriterTests { Map attributes = orderedMap("test", "value"); attributes.put("another", true); this.json.writeObject(attributes); - assertThat(out.toString()).isEqualTo(""" + assertThat(out.toString()).isEqualToNormalizingNewlines(""" { "test": "value", "another": true @@ -54,11 +54,11 @@ class BasicJsonWriterTests { } @Test - void writeObjectWitNestedObject() { + void writeObjectWithNestedObject() { Map attributes = orderedMap("test", "value"); attributes.put("nested", orderedMap("enabled", false)); this.json.writeObject(attributes); - assertThat(out.toString()).isEqualTo(""" + assertThat(out.toString()).isEqualToNormalizingNewlines(""" { "test": "value", "nested": { @@ -69,11 +69,11 @@ class BasicJsonWriterTests { } @Test - void writeObjectWitNestedArrayOfString() { + void writeObjectWithNestedArrayOfString() { Map attributes = orderedMap("test", "value"); attributes.put("nested", List.of("test", "value", "another")); this.json.writeObject(attributes); - assertThat(out.toString()).isEqualTo(""" + assertThat(out.toString()).isEqualToNormalizingNewlines(""" { "test": "value", "nested": [ @@ -86,13 +86,13 @@ class BasicJsonWriterTests { } @Test - void writeObjectWitNestedArrayOfObject() { + void writeObjectWithNestedArrayOfObject() { Map attributes = orderedMap("test", "value"); LinkedHashMap secondNested = orderedMap("name", "second"); secondNested.put("enabled", false); attributes.put("nested", List.of(orderedMap("name", "first"), secondNested, orderedMap("name", "third"))); this.json.writeObject(attributes); - assertThat(out.toString()).isEqualTo(""" + assertThat(out.toString()).isEqualToNormalizingNewlines(""" { "test": "value", "nested": [ @@ -116,7 +116,7 @@ class BasicJsonWriterTests { Map attributes = orderedMap("test", "value"); attributes.put("nested", Collections.emptyList()); this.json.writeObject(attributes); - assertThat(out.toString()).isEqualTo(""" + assertThat(out.toString()).isEqualToNormalizingNewlines(""" { "test": "value", "nested": [ ] @@ -129,7 +129,7 @@ class BasicJsonWriterTests { Map attributes = orderedMap("test", "value"); attributes.put("nested", Collections.emptyMap()); this.json.writeObject(attributes); - assertThat(out.toString()).isEqualTo(""" + assertThat(out.toString()).isEqualToNormalizingNewlines(""" { "test": "value", "nested": { }