From 11ef1041c24c34c0db211c2395f7d2b7ea151a9a Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 30 Sep 2024 17:53:56 +0000 Subject: [PATCH] a reformat code --- .../java/org/approvaltests/JsonJacksonApprovalsTest.java | 8 +++----- .../main/java/org/approvaltests/JsonJacksonApprovals.java | 6 ++++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/approvaltests-tests/src/test/java/org/approvaltests/JsonJacksonApprovalsTest.java b/approvaltests-tests/src/test/java/org/approvaltests/JsonJacksonApprovalsTest.java index 0d76178e..d08a918e 100644 --- a/approvaltests-tests/src/test/java/org/approvaltests/JsonJacksonApprovalsTest.java +++ b/approvaltests-tests/src/test/java/org/approvaltests/JsonJacksonApprovalsTest.java @@ -12,9 +12,7 @@ public class JsonJacksonApprovalsTest void testObjectMapperOverride() { MyClass o = new MyClass(); - - JsonJacksonApprovals.verifyAsJson(o, (om)-> om - .setSerializationInclusion(JsonInclude.Include.NON_NULL)); + JsonJacksonApprovals.verifyAsJson(o, (om) -> om.setSerializationInclusion(JsonInclude.Include.NON_NULL)); } @Test void testDuplicateFields() @@ -24,8 +22,8 @@ void testDuplicateFields() private static class MyClass { @JsonIgnore - private String name = "MyClass"; - public String lastName = "MyClass"; + private String name = "MyClass"; + public String lastName = "MyClass"; public String middleName = null; public String getName() { diff --git a/approvaltests/src/main/java/org/approvaltests/JsonJacksonApprovals.java b/approvaltests/src/main/java/org/approvaltests/JsonJacksonApprovals.java index 065b915b..fe6cadb6 100644 --- a/approvaltests/src/main/java/org/approvaltests/JsonJacksonApprovals.java +++ b/approvaltests/src/main/java/org/approvaltests/JsonJacksonApprovals.java @@ -22,11 +22,13 @@ public static void verifyAsJson(Object o, Function1 { verifyAsJson(o, objectMapperBuilder, new Options()); } - public static void verifyAsJson(Object o, Function1 objectMapperBuilder, Options options) + public static void verifyAsJson(Object o, Function1 objectMapperBuilder, + Options options) { Approvals.verify(asJson(o, objectMapperBuilder), options.forFile().withExtension(".json")); } - public static String asJson(Object o) { + public static String asJson(Object o) + { return asJson(o, a -> a); } public static String asJson(Object o, Function1 objectMapperBuilder)