diff --git a/src/test/java/org/apache/commons/csv/CSVFormatBuilderTest.java b/src/test/java/org/apache/commons/csv/CSVFormatBuilderTest.java index 4eac0001..5a83f6f1 100644 --- a/src/test/java/org/apache/commons/csv/CSVFormatBuilderTest.java +++ b/src/test/java/org/apache/commons/csv/CSVFormatBuilderTest.java @@ -24,6 +24,7 @@ import static org.apache.commons.csv.Constants.LF; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotSame; +import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import org.apache.commons.csv.CSVFormat.CSVFormatBuilder; @@ -153,6 +154,11 @@ public class CSVFormatBuilderTest { assertEquals(Quote.ALL, builder.withQuotePolicy(Quote.ALL).build().getQuotePolicy()); } + @Test + public void testDefaultQuotePolicy() { + assertNull(builder.build().getQuotePolicy()); + } + @Test(expected = IllegalStateException.class) public void testQuotePolicyNoneWithoutEscapeThrowsException() { CSVFormat.newBuilder('!').withQuotePolicy(Quote.NONE).build();