Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JooHyukKim committed Jan 29, 2025
1 parent 7f35bed commit aa09df5
Show file tree
Hide file tree
Showing 6 changed files with 351 additions and 351 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void testUnknownClassAsSubtype() throws Exception
ObjectReader reader = MAPPER.readerFor(BaseUnknownWrapper.class)
.without(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE);
BaseUnknownWrapper w = reader.readValue(a2q
("{'value':{'clazz':'com.foobar.Nothing'}}'"));
("{'value':{'clazz':'com.foobar.Nothing'}}"));
assertNotNull(w);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public void testUnknownClassAsSubtype() throws Exception
.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false)
.build();
BaseWrapper w = mapper.readValue(a2q
("{'value':{'clazz':'com.foobar.Nothing'}}'"),
("{'value':{'clazz':'com.foobar.Nothing'}}"),
BaseWrapper.class);
assertNotNull(w);
assertNull(w.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ public Orange(@JsonProperty("name") String name, @JsonProperty("name") String co
public void testIssue3008() throws Exception
{
ObjectReader r = MAPPER.readerFor(Box3008.class);
Box3008 deserOrangeBox = r.readValue("{\"type\":null,\"fruit\":null}}");
Box3008 deserOrangeBox = r.readValue("{\"type\":null,\"fruit\":null}");
assertNull(deserOrangeBox.fruit);
assertNull(deserOrangeBox.type); // error: "expected null, but was:<null>"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void testExternalTypeId() throws Exception
// [databind#1198]
@Test
public void test1198Fails() throws Exception {
String json = "{ \"name\": \"foo\", \"attack\":\"right\" } }";
String json = "{ \"name\": \"foo\", \"attack\":\"right\" }";

Character character = MAPPER.readValue(json, Character.class);

Expand All @@ -123,7 +123,7 @@ public void test1198Fails() throws Exception {
// [databind#1198]
@Test
public void test1198Works() throws Exception {
String json = "{ \"name\": \"foo\", \"preferredAttack\": \"KICK\", \"attack\":\"right\" } }";
String json = "{ \"name\": \"foo\", \"preferredAttack\": \"KICK\", \"attack\":\"right\" }";

Character character = MAPPER.readValue(json, Character.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ public static Orange getOrange(@JsonProperty("name") String name, @JsonProperty(
private static final Orange orange = new Orange("Orange", "orange");
private static final Box orangeBox = new Box("orange", orange);
private static final String orangeBoxJson = "{\"type\":\"orange\",\"fruit\":{\"name\":\"Orange\",\"color\":\"orange\"}}";
private static final String orangeBoxNullJson = "{\"type\":\"orange\",\"fruit\":null}}";
private static final String orangeBoxEmptyJson = "{\"type\":\"orange\",\"fruit\":{}}}";
private static final String orangeBoxMissingJson = "{\"type\":\"orange\"}}";
private static final String orangeBoxNullJson = "{\"type\":\"orange\",\"fruit\":null}";
private static final String orangeBoxEmptyJson = "{\"type\":\"orange\",\"fruit\":{}}";
private static final String orangeBoxMissingJson = "{\"type\":\"orange\"}";

private static final Apple apple = new Apple("Apple", 16);
private static Box appleBox = new Box("apple", apple);
Expand Down
Loading

0 comments on commit aa09df5

Please sign in to comment.