From bb3bb0d65b121fef2919027556d990cba65ede18 Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Wed, 8 May 2013 23:43:14 +0000 Subject: [PATCH] Test default Quote policy git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1480498 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/commons/csv/CSVFormatBuilderTest.java | 6 ++++++ 1 file changed, 6 insertions(+) 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();