Skip to content

Commit 11fac99

Browse files
committed
...
1 parent 138757b commit 11fac99

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

ion/src/test/java/com/fasterxml/jackson/dataformat/ion/ionvalue/IonValueMapperTest.java

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import com.fasterxml.jackson.dataformat.ion.IonSymbolSerializer;
3434
import com.fasterxml.jackson.dataformat.ion.IonFactory;
3535
import com.fasterxml.jackson.dataformat.ion.IonObjectMapper;
36-
import com.fasterxml.jackson.dataformat.ion.ionvalue.IonValueMapper;
3736

3837
import software.amazon.ion.IonSexp;
3938
import software.amazon.ion.IonSystem;
@@ -182,23 +181,23 @@ public void testPojo3WithOpenContent() throws Exception {
182181

183182
@Test
184183
public void testPojo4WithSexpInArrayIgnored() throws Exception {
185-
IonObjectMapper mapper = new IonValueMapper(ionSystem);
186-
mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
187-
184+
IonObjectMapper mapper = IonObjectMapper.builder(ionF)
185+
.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
186+
.propertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE)
187+
.build();
188188
String value = "{value:[([])], number:\"Random\"}";
189189
TestPojo4 test = mapper.readValue(ionSystem.singleValue(value), TestPojo4.class);
190190
assertNotNull(test);
191191
assertNotNull(test.number);
192192
assertEquals("Random", test.number);
193193
}
194194

195-
// 16-Feb-2018, tatu: Not 100% sure why it fails after changes to the way Module registration
196-
// occurs (at `jackson-databind`) level
197-
/*
198195
@Test
199196
public void testPojo5WithSexpInArray() throws Exception {
200-
IonObjectMapper mapper = new IonValueMapper(ionSystem);
201-
mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
197+
IonObjectMapper mapper = IonObjectMapper.builder(ionF)
198+
.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
199+
.propertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE)
200+
.build();
202201

203202
String value = "{value:[([blah])], number:\"Random\"}";
204203
TestPojo5 test = mapper.readValue(ionSystem.singleValue(value), TestPojo5.class);
@@ -209,7 +208,6 @@ public void testPojo5WithSexpInArray() throws Exception {
209208

210209
assertRoundTrip(value, TestPojo5.class);
211210
}
212-
*/
213211

214212
private void assertRoundTrip(String ion, Class<?> clazz) throws IOException {
215213
IonValue expected = ionSystem.singleValue(ion);

0 commit comments

Comments
 (0)