Skip to content

Commit

Permalink
a reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Sep 30, 2024
1 parent 359e6ae commit 11ef104
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ public static void verifyAsJson(Object o, Function1<ObjectMapper, ObjectMapper>
{
verifyAsJson(o, objectMapperBuilder, new Options());
}
public static void verifyAsJson(Object o, Function1<ObjectMapper, ObjectMapper> objectMapperBuilder, Options options)
public static void verifyAsJson(Object o, Function1<ObjectMapper, ObjectMapper> 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<ObjectMapper, ObjectMapper> objectMapperBuilder)
Expand Down

0 comments on commit 11ef104

Please sign in to comment.