Author: sebb Date: Fri Mar 30 00:57:29 2012 New Revision: 1307186 URL: http://svn.apache.org/viewvc?rev=1307186&view=rev Log: Reduce dependency on DISABLED package constant
Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java?rev=1307186&r1=1307185&r2=1307186&view=diff ============================================================================== --- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java (original) +++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java Fri Mar 30 00:57:29 2012 @@ -297,7 +297,8 @@ public class CSVParserTest { }; - CSVFormat format = new CSVFormat(',', '\'', CSVFormat.DISABLED, '/', false, true, "\r\n", null); + CSVFormat format = CSVFormat.PRISTINE.withDelimiter(',').withEncapsulator('\'').withEscape('/') + .withEmptyLinesIgnored(true).withLineSeparator("\r\n"); CSVParser parser = new CSVParser(code, format); List<CSVRecord> records = parser.getRecords(); @@ -326,7 +327,8 @@ public class CSVParserTest { }; - CSVFormat format = new CSVFormat(',', CSVFormat.DISABLED, CSVFormat.DISABLED, '/', false, true, "\r\n", null); + CSVFormat format = CSVFormat.PRISTINE.withDelimiter(',').withEscape('/') + .withEmptyLinesIgnored(true).withLineSeparator("\r\n"); CSVParser parser = new CSVParser(code, format); List<CSVRecord> records = parser.getRecords(); @@ -351,7 +353,7 @@ public class CSVParserTest { }; CSVFormat format = CSVFormat.DEFAULT; - assertEquals(CSVFormat.DISABLED, format.getCommentStart()); + assertFalse(format.isCommentingEnabled()); CSVParser parser = new CSVParser(code, format); List<CSVRecord> records = parser.getRecords();