diff --git a/src/test/java/com/fasterxml/jackson/dataformat/csv/ser/NullWritingTest.java b/src/test/java/com/fasterxml/jackson/dataformat/csv/ser/NullWritingTest.java index 53bb7e7..7711414 100644 --- a/src/test/java/com/fasterxml/jackson/dataformat/csv/ser/NullWritingTest.java +++ b/src/test/java/com/fasterxml/jackson/dataformat/csv/ser/NullWritingTest.java @@ -93,6 +93,14 @@ public void testCustomNullValueInObjectListIssue106() throws Exception String result = mapper.writer(schema).writeValueAsString(list); assertEquals("d0,n/a,d2\n", result); + + list = Arrays.asList(null, "d1", "d2"); + result = mapper.writer(schema).writeValueAsString(list); + assertEquals("n/a,d1,d2\n", result); + + list = Arrays.asList("d0", "d1", null); + result = mapper.writer(schema).writeValueAsString(list); + assertEquals("d0,d1,n/a\n", result); } public void testDefaultNullValueInObjectListIssue106() throws Exception @@ -104,8 +112,15 @@ public void testDefaultNullValueInObjectListIssue106() throws Exception .build(); List list = Arrays.asList("d0", null, "d2"); - String result = mapper.writer(schema).writeValueAsString(list); assertEquals("d0,,d2\n", result); + + list = Arrays.asList(null, "d1", "d2"); + result = mapper.writer(schema).writeValueAsString(list); + assertEquals(",d1,d2\n", result); + + list = Arrays.asList("d0", "d1", null); + result = mapper.writer(schema).writeValueAsString(list); + assertEquals("d0,d1,\n", result); } }