@@ -86,7 +86,7 @@ public void testEquals() {
8686 @ Test
8787 public void testEqualsCommentStart () {
8888 final CSVFormat right = CSVFormat .newFormat ('\'' )
89- .withQuoteChar ('"' )
89+ .withQuote ('"' )
9090 .withCommentMarker ('#' )
9191 .withQuoteMode (QuoteMode .ALL );
9292 final CSVFormat left = right
@@ -106,7 +106,7 @@ public void testEqualsDelimiter() {
106106 @ Test
107107 public void testEqualsEscape () {
108108 final CSVFormat right = CSVFormat .newFormat ('\'' )
109- .withQuoteChar ('"' )
109+ .withQuote ('"' )
110110 .withCommentMarker ('#' )
111111 .withEscape ('+' )
112112 .withQuoteMode (QuoteMode .ALL );
@@ -125,7 +125,7 @@ public void testEqualsHeader() {
125125 .withHeader ("One" , "Two" , "Three" )
126126 .withIgnoreEmptyLines (true )
127127 .withIgnoreSurroundingSpaces (true )
128- .withQuoteChar ('"' )
128+ .withQuote ('"' )
129129 .withQuoteMode (QuoteMode .ALL );
130130 final CSVFormat left = right
131131 .withHeader ("Three" , "Two" , "One" );
@@ -140,7 +140,7 @@ public void testEqualsIgnoreEmptyLines() {
140140 .withEscape ('+' )
141141 .withIgnoreEmptyLines (true )
142142 .withIgnoreSurroundingSpaces (true )
143- .withQuoteChar ('"' )
143+ .withQuote ('"' )
144144 .withQuoteMode (QuoteMode .ALL );
145145 final CSVFormat left = right
146146 .withIgnoreEmptyLines (false );
@@ -154,7 +154,7 @@ public void testEqualsIgnoreSurroundingSpaces() {
154154 .withCommentMarker ('#' )
155155 .withEscape ('+' )
156156 .withIgnoreSurroundingSpaces (true )
157- .withQuoteChar ('"' )
157+ .withQuote ('"' )
158158 .withQuoteMode (QuoteMode .ALL );
159159 final CSVFormat left = right
160160 .withIgnoreSurroundingSpaces (false );
@@ -164,16 +164,16 @@ public void testEqualsIgnoreSurroundingSpaces() {
164164
165165 @ Test
166166 public void testEqualsQuoteChar () {
167- final CSVFormat right = CSVFormat .newFormat ('\'' ).withQuoteChar ('"' );
168- final CSVFormat left = right .withQuoteChar ('!' );
167+ final CSVFormat right = CSVFormat .newFormat ('\'' ).withQuote ('"' );
168+ final CSVFormat left = right .withQuote ('!' );
169169
170170 assertNotEquals (right , left );
171171 }
172172
173173 @ Test
174174 public void testEqualsQuotePolicy () {
175175 final CSVFormat right = CSVFormat .newFormat ('\'' )
176- .withQuoteChar ('"' )
176+ .withQuote ('"' )
177177 .withQuoteMode (QuoteMode .ALL );
178178 final CSVFormat left = right
179179 .withQuoteMode (QuoteMode .MINIMAL );
@@ -189,7 +189,7 @@ public void testEqualsRecordSeparator() {
189189 .withEscape ('+' )
190190 .withIgnoreEmptyLines (true )
191191 .withIgnoreSurroundingSpaces (true )
192- .withQuoteChar ('"' )
192+ .withQuote ('"' )
193193 .withQuoteMode (QuoteMode .ALL );
194194 final CSVFormat left = right
195195 .withRecordSeparator (LF );
@@ -205,7 +205,7 @@ public void testEqualsNullString() {
205205 .withEscape ('+' )
206206 .withIgnoreEmptyLines (true )
207207 .withIgnoreSurroundingSpaces (true )
208- .withQuoteChar ('"' )
208+ .withQuote ('"' )
209209 .withQuoteMode (QuoteMode .ALL )
210210 .withNullString ("null" );
211211 final CSVFormat left = right
@@ -222,7 +222,7 @@ public void testEqualsSkipHeaderRecord() {
222222 .withEscape ('+' )
223223 .withIgnoreEmptyLines (true )
224224 .withIgnoreSurroundingSpaces (true )
225- .withQuoteChar ('"' )
225+ .withQuote ('"' )
226226 .withQuoteMode (QuoteMode .ALL )
227227 .withNullString ("null" )
228228 .withSkipHeaderRecord (true );
@@ -275,18 +275,18 @@ public void testNullRecordSeparatorCsv106() {
275275
276276 @ Test (expected = IllegalArgumentException .class )
277277 public void testQuoteCharSameAsCommentStartThrowsException () {
278- CSVFormat .DEFAULT .withQuoteChar ('!' ).withCommentMarker ('!' );
278+ CSVFormat .DEFAULT .withQuote ('!' ).withCommentMarker ('!' );
279279 }
280280
281281 @ Test (expected = IllegalArgumentException .class )
282282 public void testQuoteCharSameAsCommentStartThrowsExceptionForWrapperType () {
283283 // Cannot assume that callers won't use different Character objects
284- CSVFormat .DEFAULT .withQuoteChar (new Character ('!' )).withCommentMarker ('!' );
284+ CSVFormat .DEFAULT .withQuote (new Character ('!' )).withCommentMarker ('!' );
285285 }
286286
287287 @ Test (expected = IllegalArgumentException .class )
288288 public void testQuoteCharSameAsDelimiterThrowsException () {
289- CSVFormat .DEFAULT .withQuoteChar ('!' ).withDelimiter ('!' );
289+ CSVFormat .DEFAULT .withQuote ('!' ).withDelimiter ('!' );
290290 }
291291
292292 @ Test (expected = IllegalArgumentException .class )
@@ -296,11 +296,11 @@ public void testQuotePolicyNoneWithoutEscapeThrowsException() {
296296
297297 @ Test
298298 public void testRFC4180 () {
299- assertEquals (null , RFC4180 .getCommentStart ());
299+ assertEquals (null , RFC4180 .getCommentStartCharacter ());
300300 assertEquals (',' , RFC4180 .getDelimiter ());
301- assertEquals (null , RFC4180 .getEscape ());
301+ assertEquals (null , RFC4180 .getEscapeCharacter ());
302302 assertFalse (RFC4180 .getIgnoreEmptyLines ());
303- assertEquals (Character .valueOf ('"' ), RFC4180 .getQuoteChar ());
303+ assertEquals (Character .valueOf ('"' ), RFC4180 .getQuoteCharacter ());
304304 assertEquals (null , RFC4180 .getQuoteMode ());
305305 assertEquals ("\r \n " , RFC4180 .getRecordSeparator ());
306306 }
@@ -320,18 +320,18 @@ public void testSerialization() throws Exception {
320320
321321 assertNotNull (format );
322322 assertEquals ("delimiter" , CSVFormat .DEFAULT .getDelimiter (), format .getDelimiter ());
323- assertEquals ("encapsulator" , CSVFormat .DEFAULT .getQuoteChar (), format .getQuoteChar ());
324- assertEquals ("comment start" , CSVFormat .DEFAULT .getCommentStart (), format .getCommentStart ());
323+ assertEquals ("encapsulator" , CSVFormat .DEFAULT .getQuoteCharacter (), format .getQuoteCharacter ());
324+ assertEquals ("comment start" , CSVFormat .DEFAULT .getCommentStartCharacter (), format .getCommentStartCharacter ());
325325 assertEquals ("record separator" , CSVFormat .DEFAULT .getRecordSeparator (), format .getRecordSeparator ());
326- assertEquals ("escape" , CSVFormat .DEFAULT .getEscape (), format .getEscape ());
326+ assertEquals ("escape" , CSVFormat .DEFAULT .getEscapeCharacter (), format .getEscapeCharacter ());
327327 assertEquals ("trim" , CSVFormat .DEFAULT .getIgnoreSurroundingSpaces (), format .getIgnoreSurroundingSpaces ());
328328 assertEquals ("empty lines" , CSVFormat .DEFAULT .getIgnoreEmptyLines (), format .getIgnoreEmptyLines ());
329329 }
330330
331331 @ Test
332332 public void testWithCommentStart () throws Exception {
333333 final CSVFormat formatWithCommentStart = CSVFormat .DEFAULT .withCommentMarker ('#' );
334- assertEquals ( Character .valueOf ('#' ), formatWithCommentStart .getCommentStart ());
334+ assertEquals ( Character .valueOf ('#' ), formatWithCommentStart .getCommentStartCharacter ());
335335 }
336336
337337 @ Test (expected = IllegalArgumentException .class )
@@ -353,7 +353,7 @@ public void testWithDelimiterLFThrowsException() {
353353 @ Test
354354 public void testWithEscape () throws Exception {
355355 final CSVFormat formatWithEscape = CSVFormat .DEFAULT .withEscape ('&' );
356- assertEquals (Character .valueOf ('&' ), formatWithEscape .getEscape ());
356+ assertEquals (Character .valueOf ('&' ), formatWithEscape .getEscapeCharacter ());
357357 }
358358
359359 @ Test (expected = IllegalArgumentException .class )
@@ -394,13 +394,13 @@ public void testWithNullString() throws Exception {
394394
395395 @ Test
396396 public void testWithQuoteChar () throws Exception {
397- final CSVFormat formatWithQuoteChar = CSVFormat .DEFAULT .withQuoteChar ('"' );
398- assertEquals (Character .valueOf ('"' ), formatWithQuoteChar .getQuoteChar ());
397+ final CSVFormat formatWithQuoteChar = CSVFormat .DEFAULT .withQuote ('"' );
398+ assertEquals (Character .valueOf ('"' ), formatWithQuoteChar .getQuoteCharacter ());
399399 }
400400
401401 @ Test (expected = IllegalArgumentException .class )
402402 public void testWithQuoteLFThrowsException () {
403- CSVFormat .DEFAULT .withQuoteChar (LF );
403+ CSVFormat .DEFAULT .withQuote (LF );
404404 }
405405
406406 @ Test
0 commit comments