Skip to content

Commit

Permalink
Fix last erroneously failing tests wrt #3406
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jan 30, 2025
1 parent cd86436 commit f85dac0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,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 @@ -112,7 +112,7 @@ public void testExternalTypeId() throws Exception
// [databind#1198]
@Test
public void testFails() throws Exception {
String json = "{ \"name\": \"foo\", \"attack\":\"right\" } }";
String json = "{ \"name\": \"foo\", \"attack\":\"right\" } ";

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

Expand All @@ -124,7 +124,7 @@ public void testFails() throws Exception {
// [databind#1198]
@Test
public void testWorks() 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
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ public Orange(String name, String c) {
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 final Box appleBox = new Box("apple", apple);
Expand Down

0 comments on commit f85dac0

Please sign in to comment.