Test default Quote policy
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1480498 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
71c69df6dd
commit
bb3bb0d65b
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue