Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jan 14, 2025
1 parent c60a71e commit 0c473bf
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import tools.jackson.dataformat.ion.polymorphism.IonAnnotationIntrospector;
import tools.jackson.dataformat.ion.polymorphism.IonAnnotationTypeResolverBuilder;
import tools.jackson.dataformat.ion.polymorphism.MultipleTypeIdResolver;
import tools.jackson.dataformat.ion.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.*;

Expand Down Expand Up @@ -182,6 +183,7 @@ public void reset() {
/**********************************************************************
*/

@JacksonTestFailureExpected
@Test
public void testSimple() throws IOException {
Bean original = new Bean("parent_field", new ChildBean("child_field"));
Expand All @@ -195,6 +197,7 @@ public void testSimple() throws IOException {
assertEquals(original.child.someField, deserialized.child.someField);
}

@JacksonTestFailureExpected
@Test
public void testSubclass() throws IOException {
IonObjectMapper mapper = IonObjectMapper.builder()
Expand All @@ -210,6 +213,7 @@ public void testSubclass() throws IOException {
assertEquals(((ChildBeanSub) original.child).extraField, ((ChildBeanSub) deserialized.child).extraField);
}

@JacksonTestFailureExpected
@Test
public void testTopLevelPolymorphism() throws IOException {
resolveAllTypes = true;
Expand All @@ -226,6 +230,7 @@ public void testTopLevelPolymorphism() throws IOException {
assertEquals(original.child.someField, deserialized.child.someField);
}

@JacksonTestFailureExpected
@Test
public void testSelectivePolymorphism() throws IOException {
// preferredTypeId is a crude testing mechanism of choosing among several serialized type ids.
Expand Down Expand Up @@ -305,6 +310,7 @@ public void testWithDateAsTimestamp() throws IOException {
assertEquals(IonType.INT, ionVal.getType(), "Expected date to be serialized into an int");
}

@JacksonTestFailureExpected
@Test
public void testPolymorphicTypeWithDate() throws IOException{
resolveAllTypes = true;
Expand Down

0 comments on commit 0c473bf

Please sign in to comment.