We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f568fd5 commit 65f1e89Copy full SHA for 65f1e89
yaml/src/test/java/com/fasterxml/jackson/dataformat/yaml/misc/ObjectAndTypeId231Test.java
@@ -34,11 +34,14 @@ public void testTypeAndObjectId231() throws Exception
34
String yaml = "list:\n" +
35
" - !Derived &id1\n" +
36
" a: foo";
37
- Container container = MAPPER.readValue (yaml, Container.class);
+ Container container = MAPPER.readValue(yaml, Container.class);
38
assertNotNull(container);
39
assertNotNull(container.list);
40
assertEquals(1, container.list.size());
41
42
- System.out.println (((Derived)container.list.get(0)).a);
+ Base item = container.list.get(0);
43
+ assertEquals(Derived.class, item.getClass());
44
+
45
+ assertEquals("foo", ((Derived) item).a);
46
}
47
0 commit comments