コード例 #1
0
 // for [databind#1301]
 public void testJavaTypeToString() throws Exception {
   TypeFactory tf = objectMapper().getTypeFactory();
   String desc = tf.constructType(DataDefinition.class).toString();
   assertNotNull(desc);
   // could try comparing exact message, but since it's informational try looser:
   if (!desc.contains("map type")) {
     fail("Description should contain 'map type', did not: " + desc);
   }
   if (!desc.contains("recursive type")) {
     fail("Description should contain 'recursive type', did not: " + desc);
   }
 }
コード例 #2
0
 // for [databind#1301]
 public void testRecursiveType() {
   TypeFactory tf = TypeFactory.defaultInstance();
   JavaType type = tf.constructType(HashTree.class);
   assertNotNull(type);
 }