Skip to content

Commit a7678e7

Browse files
committed
Minor refactoring of tests, to troubleshoot regression caused by databind (for 2.6.0-snapshot)
1 parent 770f4ed commit a7678e7

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/main/java/com/fasterxml/jackson/module/jsonSchema/types/ContainerTypeSchema.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.fasterxml.jackson.module.jsonSchema.types;
22

33
import java.util.Collections;
4-
import java.util.HashSet;
54
import java.util.Set;
65

76
import com.fasterxml.jackson.annotation.JsonProperty;

src/test/java/com/fasterxml/jackson/module/jsonSchema/EnumGenerationTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ public void testEnumWithToString() throws Exception
5252
Map<String, Object> result = (Map<String, Object>) mapper.convertValue(jsonSchema, Map.class);
5353
assertNotNull(result);
5454
assertTrue(jsonSchema.isObjectSchema());
55-
assertEquals(expectedAsMap(true), result);
55+
Map<String,Object> exp = expectedAsMap(true);
56+
if (!exp.equals(result)) {
57+
String expJson = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(exp);
58+
String actJson = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(result);
59+
fail("Different JSON: expected:\n"+expJson+"\ngot:\n"+actJson);
60+
}
5661
}
5762

5863
@SuppressWarnings("serial")

src/test/java/com/fasterxml/jackson/module/jsonSchema/TestReadJsonSchema.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import com.fasterxml.jackson.module.jsonSchema.factories.SchemaFactoryWrapper;
1010
import com.fasterxml.jackson.module.jsonSchema.types.ArraySchema;
1111
import com.fasterxml.jackson.module.jsonSchema.types.ObjectSchema;
12-
import junit.framework.Assert;
1312

1413
/**
1514
* Trivial test to ensure {@link JsonSchema} can be also deserialized

0 commit comments

Comments
 (0)