commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1747331 - /commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java
Date Wed, 08 Jun 2016 00:48:45 GMT
Author: ggregory
Date: Wed Jun  8 00:48:45 2016
New Revision: 1747331

URL: http://svn.apache.org/viewvc?rev=1747331&view=rev
Log:
Add tests for CSVFormat.equals for null quotes. Closes #12. 

Modified:
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java

Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java?rev=1747331&r1=1747330&r2=1747331&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java Wed Jun
 8 00:48:45 2016
@@ -172,6 +172,22 @@ public class CSVFormatTest {
     }
 
     @Test
+    public void testEqualsLeftNoQuoteRightQuote() {
+    	final CSVFormat left = CSVFormat.newFormat(',').withQuote(null);
+    	final CSVFormat right = left.withQuote('#');
+    	
+    	assertNotEquals(left, right);
+    }
+
+    @Test
+    public void testEqualsNoQuotes() {
+    	final CSVFormat left = CSVFormat.newFormat(',').withQuote(null);
+    	final CSVFormat right = left.withQuote(null);
+
+    	assertEquals(left, right);
+    }
+
+    @Test
     public void testEqualsQuotePolicy() {
         final CSVFormat right = CSVFormat.newFormat('\'')
                 .withQuote('"')



Mime
View raw message