Fix odd local variable names.
This commit is contained in:
parent
50d727fc64
commit
2a6bcc1f73
|
@ -221,129 +221,129 @@ public class CSVFormatTest {
|
|||
@Test
|
||||
public void testEqualsOne() {
|
||||
|
||||
final CSVFormat cSVFormatOne = CSVFormat.INFORMIX_UNLOAD;
|
||||
final CSVFormat cSVFormatTwo = CSVFormat.MYSQL;
|
||||
final CSVFormat csvFormatOne = CSVFormat.INFORMIX_UNLOAD;
|
||||
final CSVFormat csvFormatTwo = CSVFormat.MYSQL;
|
||||
|
||||
|
||||
assertEquals('\\', (char)cSVFormatOne.getEscapeCharacter());
|
||||
assertNull(cSVFormatOne.getQuoteMode());
|
||||
assertEquals('\\', (char)csvFormatOne.getEscapeCharacter());
|
||||
assertNull(csvFormatOne.getQuoteMode());
|
||||
|
||||
assertTrue(cSVFormatOne.getIgnoreEmptyLines());
|
||||
assertFalse(cSVFormatOne.getSkipHeaderRecord());
|
||||
assertTrue(csvFormatOne.getIgnoreEmptyLines());
|
||||
assertFalse(csvFormatOne.getSkipHeaderRecord());
|
||||
|
||||
assertFalse(cSVFormatOne.getIgnoreHeaderCase());
|
||||
assertNull(cSVFormatOne.getCommentMarker());
|
||||
assertFalse(csvFormatOne.getIgnoreHeaderCase());
|
||||
assertNull(csvFormatOne.getCommentMarker());
|
||||
|
||||
assertFalse(cSVFormatOne.isCommentMarkerSet());
|
||||
assertTrue(cSVFormatOne.isQuoteCharacterSet());
|
||||
assertFalse(csvFormatOne.isCommentMarkerSet());
|
||||
assertTrue(csvFormatOne.isQuoteCharacterSet());
|
||||
|
||||
assertEquals('|', cSVFormatOne.getDelimiter());
|
||||
assertFalse(cSVFormatOne.getAllowMissingColumnNames());
|
||||
assertEquals('|', csvFormatOne.getDelimiter());
|
||||
assertFalse(csvFormatOne.getAllowMissingColumnNames());
|
||||
|
||||
assertTrue(cSVFormatOne.isEscapeCharacterSet());
|
||||
assertEquals("\n", cSVFormatOne.getRecordSeparator());
|
||||
assertTrue(csvFormatOne.isEscapeCharacterSet());
|
||||
assertEquals("\n", csvFormatOne.getRecordSeparator());
|
||||
|
||||
assertEquals('\"', (char)cSVFormatOne.getQuoteCharacter());
|
||||
assertFalse(cSVFormatOne.getTrailingDelimiter());
|
||||
assertEquals('\"', (char)csvFormatOne.getQuoteCharacter());
|
||||
assertFalse(csvFormatOne.getTrailingDelimiter());
|
||||
|
||||
assertFalse(cSVFormatOne.getTrim());
|
||||
assertFalse(cSVFormatOne.isNullStringSet());
|
||||
assertFalse(csvFormatOne.getTrim());
|
||||
assertFalse(csvFormatOne.isNullStringSet());
|
||||
|
||||
assertNull(cSVFormatOne.getNullString());
|
||||
assertFalse(cSVFormatOne.getIgnoreSurroundingSpaces());
|
||||
assertNull(csvFormatOne.getNullString());
|
||||
assertFalse(csvFormatOne.getIgnoreSurroundingSpaces());
|
||||
|
||||
|
||||
assertTrue(cSVFormatTwo.isEscapeCharacterSet());
|
||||
assertNull(cSVFormatTwo.getQuoteCharacter());
|
||||
assertTrue(csvFormatTwo.isEscapeCharacterSet());
|
||||
assertNull(csvFormatTwo.getQuoteCharacter());
|
||||
|
||||
assertFalse(cSVFormatTwo.getAllowMissingColumnNames());
|
||||
assertEquals(QuoteMode.ALL_NON_NULL, cSVFormatTwo.getQuoteMode());
|
||||
assertFalse(csvFormatTwo.getAllowMissingColumnNames());
|
||||
assertEquals(QuoteMode.ALL_NON_NULL, csvFormatTwo.getQuoteMode());
|
||||
|
||||
assertEquals('\t', cSVFormatTwo.getDelimiter());
|
||||
assertEquals("\n", cSVFormatTwo.getRecordSeparator());
|
||||
assertEquals('\t', csvFormatTwo.getDelimiter());
|
||||
assertEquals("\n", csvFormatTwo.getRecordSeparator());
|
||||
|
||||
assertFalse(cSVFormatTwo.isQuoteCharacterSet());
|
||||
assertTrue(cSVFormatTwo.isNullStringSet());
|
||||
assertFalse(csvFormatTwo.isQuoteCharacterSet());
|
||||
assertTrue(csvFormatTwo.isNullStringSet());
|
||||
|
||||
assertEquals('\\', (char)cSVFormatTwo.getEscapeCharacter());
|
||||
assertFalse(cSVFormatTwo.getIgnoreHeaderCase());
|
||||
assertEquals('\\', (char)csvFormatTwo.getEscapeCharacter());
|
||||
assertFalse(csvFormatTwo.getIgnoreHeaderCase());
|
||||
|
||||
assertFalse(cSVFormatTwo.getTrim());
|
||||
assertFalse(cSVFormatTwo.getIgnoreEmptyLines());
|
||||
assertFalse(csvFormatTwo.getTrim());
|
||||
assertFalse(csvFormatTwo.getIgnoreEmptyLines());
|
||||
|
||||
assertEquals("\\N", cSVFormatTwo.getNullString());
|
||||
assertFalse(cSVFormatTwo.getIgnoreSurroundingSpaces());
|
||||
assertEquals("\\N", csvFormatTwo.getNullString());
|
||||
assertFalse(csvFormatTwo.getIgnoreSurroundingSpaces());
|
||||
|
||||
assertFalse(cSVFormatTwo.getTrailingDelimiter());
|
||||
assertFalse(cSVFormatTwo.getSkipHeaderRecord());
|
||||
assertFalse(csvFormatTwo.getTrailingDelimiter());
|
||||
assertFalse(csvFormatTwo.getSkipHeaderRecord());
|
||||
|
||||
assertNull(cSVFormatTwo.getCommentMarker());
|
||||
assertFalse(cSVFormatTwo.isCommentMarkerSet());
|
||||
assertNull(csvFormatTwo.getCommentMarker());
|
||||
assertFalse(csvFormatTwo.isCommentMarkerSet());
|
||||
|
||||
assertNotSame(cSVFormatTwo, cSVFormatOne);
|
||||
assertFalse(cSVFormatTwo.equals(cSVFormatOne));
|
||||
assertNotSame(csvFormatTwo, csvFormatOne);
|
||||
assertFalse(csvFormatTwo.equals(csvFormatOne));
|
||||
|
||||
assertEquals('\\', (char)cSVFormatOne.getEscapeCharacter());
|
||||
assertNull(cSVFormatOne.getQuoteMode());
|
||||
assertEquals('\\', (char)csvFormatOne.getEscapeCharacter());
|
||||
assertNull(csvFormatOne.getQuoteMode());
|
||||
|
||||
assertTrue(cSVFormatOne.getIgnoreEmptyLines());
|
||||
assertFalse(cSVFormatOne.getSkipHeaderRecord());
|
||||
assertTrue(csvFormatOne.getIgnoreEmptyLines());
|
||||
assertFalse(csvFormatOne.getSkipHeaderRecord());
|
||||
|
||||
assertFalse(cSVFormatOne.getIgnoreHeaderCase());
|
||||
assertNull(cSVFormatOne.getCommentMarker());
|
||||
assertFalse(csvFormatOne.getIgnoreHeaderCase());
|
||||
assertNull(csvFormatOne.getCommentMarker());
|
||||
|
||||
assertFalse(cSVFormatOne.isCommentMarkerSet());
|
||||
assertTrue(cSVFormatOne.isQuoteCharacterSet());
|
||||
assertFalse(csvFormatOne.isCommentMarkerSet());
|
||||
assertTrue(csvFormatOne.isQuoteCharacterSet());
|
||||
|
||||
assertEquals('|', cSVFormatOne.getDelimiter());
|
||||
assertFalse(cSVFormatOne.getAllowMissingColumnNames());
|
||||
assertEquals('|', csvFormatOne.getDelimiter());
|
||||
assertFalse(csvFormatOne.getAllowMissingColumnNames());
|
||||
|
||||
assertTrue(cSVFormatOne.isEscapeCharacterSet());
|
||||
assertEquals("\n", cSVFormatOne.getRecordSeparator());
|
||||
assertTrue(csvFormatOne.isEscapeCharacterSet());
|
||||
assertEquals("\n", csvFormatOne.getRecordSeparator());
|
||||
|
||||
assertEquals('\"', (char)cSVFormatOne.getQuoteCharacter());
|
||||
assertFalse(cSVFormatOne.getTrailingDelimiter());
|
||||
assertEquals('\"', (char)csvFormatOne.getQuoteCharacter());
|
||||
assertFalse(csvFormatOne.getTrailingDelimiter());
|
||||
|
||||
assertFalse(cSVFormatOne.getTrim());
|
||||
assertFalse(cSVFormatOne.isNullStringSet());
|
||||
assertFalse(csvFormatOne.getTrim());
|
||||
assertFalse(csvFormatOne.isNullStringSet());
|
||||
|
||||
assertNull(cSVFormatOne.getNullString());
|
||||
assertFalse(cSVFormatOne.getIgnoreSurroundingSpaces());
|
||||
assertNull(csvFormatOne.getNullString());
|
||||
assertFalse(csvFormatOne.getIgnoreSurroundingSpaces());
|
||||
|
||||
assertTrue(cSVFormatTwo.isEscapeCharacterSet());
|
||||
assertNull(cSVFormatTwo.getQuoteCharacter());
|
||||
assertTrue(csvFormatTwo.isEscapeCharacterSet());
|
||||
assertNull(csvFormatTwo.getQuoteCharacter());
|
||||
|
||||
assertFalse(cSVFormatTwo.getAllowMissingColumnNames());
|
||||
assertEquals(QuoteMode.ALL_NON_NULL, cSVFormatTwo.getQuoteMode());
|
||||
assertFalse(csvFormatTwo.getAllowMissingColumnNames());
|
||||
assertEquals(QuoteMode.ALL_NON_NULL, csvFormatTwo.getQuoteMode());
|
||||
|
||||
assertEquals('\t', cSVFormatTwo.getDelimiter());
|
||||
assertEquals("\n", cSVFormatTwo.getRecordSeparator());
|
||||
assertEquals('\t', csvFormatTwo.getDelimiter());
|
||||
assertEquals("\n", csvFormatTwo.getRecordSeparator());
|
||||
|
||||
assertFalse(cSVFormatTwo.isQuoteCharacterSet());
|
||||
assertTrue(cSVFormatTwo.isNullStringSet());
|
||||
assertFalse(csvFormatTwo.isQuoteCharacterSet());
|
||||
assertTrue(csvFormatTwo.isNullStringSet());
|
||||
|
||||
assertEquals('\\', (char)cSVFormatTwo.getEscapeCharacter());
|
||||
assertFalse(cSVFormatTwo.getIgnoreHeaderCase());
|
||||
assertEquals('\\', (char)csvFormatTwo.getEscapeCharacter());
|
||||
assertFalse(csvFormatTwo.getIgnoreHeaderCase());
|
||||
|
||||
assertFalse(cSVFormatTwo.getTrim());
|
||||
assertFalse(cSVFormatTwo.getIgnoreEmptyLines());
|
||||
assertFalse(csvFormatTwo.getTrim());
|
||||
assertFalse(csvFormatTwo.getIgnoreEmptyLines());
|
||||
|
||||
assertEquals("\\N", cSVFormatTwo.getNullString());
|
||||
assertFalse(cSVFormatTwo.getIgnoreSurroundingSpaces());
|
||||
assertEquals("\\N", csvFormatTwo.getNullString());
|
||||
assertFalse(csvFormatTwo.getIgnoreSurroundingSpaces());
|
||||
|
||||
assertFalse(cSVFormatTwo.getTrailingDelimiter());
|
||||
assertFalse(cSVFormatTwo.getSkipHeaderRecord());
|
||||
assertFalse(csvFormatTwo.getTrailingDelimiter());
|
||||
assertFalse(csvFormatTwo.getSkipHeaderRecord());
|
||||
|
||||
assertNull(cSVFormatTwo.getCommentMarker());
|
||||
assertFalse(cSVFormatTwo.isCommentMarkerSet());
|
||||
assertNull(csvFormatTwo.getCommentMarker());
|
||||
assertFalse(csvFormatTwo.isCommentMarkerSet());
|
||||
|
||||
assertNotSame(cSVFormatOne, cSVFormatTwo);
|
||||
assertNotSame(cSVFormatTwo, cSVFormatOne);
|
||||
assertNotSame(csvFormatOne, csvFormatTwo);
|
||||
assertNotSame(csvFormatTwo, csvFormatOne);
|
||||
|
||||
assertFalse(cSVFormatOne.equals(cSVFormatTwo));
|
||||
assertFalse(cSVFormatTwo.equals(cSVFormatOne));
|
||||
assertFalse(csvFormatOne.equals(csvFormatTwo));
|
||||
assertFalse(csvFormatTwo.equals(csvFormatOne));
|
||||
|
||||
assertFalse(cSVFormatTwo.equals(cSVFormatOne));
|
||||
assertFalse(csvFormatTwo.equals(csvFormatOne));
|
||||
|
||||
}
|
||||
|
||||
|
@ -403,63 +403,63 @@ public class CSVFormatTest {
|
|||
@Test
|
||||
public void testEqualsWithNull() {
|
||||
|
||||
final CSVFormat cSVFormat = CSVFormat.POSTGRESQL_TEXT;
|
||||
final CSVFormat csvFormat = CSVFormat.POSTGRESQL_TEXT;
|
||||
|
||||
assertEquals('\\', (char)cSVFormat.getEscapeCharacter());
|
||||
assertFalse(cSVFormat.getIgnoreSurroundingSpaces());
|
||||
assertEquals('\\', (char)csvFormat.getEscapeCharacter());
|
||||
assertFalse(csvFormat.getIgnoreSurroundingSpaces());
|
||||
|
||||
assertFalse(cSVFormat.getTrailingDelimiter());
|
||||
assertFalse(cSVFormat.getTrim());
|
||||
assertFalse(csvFormat.getTrailingDelimiter());
|
||||
assertFalse(csvFormat.getTrim());
|
||||
|
||||
assertTrue(cSVFormat.isQuoteCharacterSet());
|
||||
assertEquals("\\N", cSVFormat.getNullString());
|
||||
assertTrue(csvFormat.isQuoteCharacterSet());
|
||||
assertEquals("\\N", csvFormat.getNullString());
|
||||
|
||||
assertFalse(cSVFormat.getIgnoreHeaderCase());
|
||||
assertTrue(cSVFormat.isEscapeCharacterSet());
|
||||
assertFalse(csvFormat.getIgnoreHeaderCase());
|
||||
assertTrue(csvFormat.isEscapeCharacterSet());
|
||||
|
||||
assertFalse(cSVFormat.isCommentMarkerSet());
|
||||
assertNull(cSVFormat.getCommentMarker());
|
||||
assertFalse(csvFormat.isCommentMarkerSet());
|
||||
assertNull(csvFormat.getCommentMarker());
|
||||
|
||||
assertFalse(cSVFormat.getAllowMissingColumnNames());
|
||||
assertEquals(QuoteMode.ALL_NON_NULL, cSVFormat.getQuoteMode());
|
||||
assertFalse(csvFormat.getAllowMissingColumnNames());
|
||||
assertEquals(QuoteMode.ALL_NON_NULL, csvFormat.getQuoteMode());
|
||||
|
||||
assertEquals('\t', cSVFormat.getDelimiter());
|
||||
assertFalse(cSVFormat.getSkipHeaderRecord());
|
||||
assertEquals('\t', csvFormat.getDelimiter());
|
||||
assertFalse(csvFormat.getSkipHeaderRecord());
|
||||
|
||||
assertEquals("\n", cSVFormat.getRecordSeparator());
|
||||
assertFalse(cSVFormat.getIgnoreEmptyLines());
|
||||
assertEquals("\n", csvFormat.getRecordSeparator());
|
||||
assertFalse(csvFormat.getIgnoreEmptyLines());
|
||||
|
||||
assertEquals('\"', (char)cSVFormat.getQuoteCharacter());
|
||||
assertTrue(cSVFormat.isNullStringSet());
|
||||
assertEquals('\"', (char)csvFormat.getQuoteCharacter());
|
||||
assertTrue(csvFormat.isNullStringSet());
|
||||
|
||||
assertEquals('\\', (char)cSVFormat.getEscapeCharacter());
|
||||
assertFalse(cSVFormat.getIgnoreSurroundingSpaces());
|
||||
assertEquals('\\', (char)csvFormat.getEscapeCharacter());
|
||||
assertFalse(csvFormat.getIgnoreSurroundingSpaces());
|
||||
|
||||
assertFalse(cSVFormat.getTrailingDelimiter());
|
||||
assertFalse(cSVFormat.getTrim());
|
||||
assertFalse(csvFormat.getTrailingDelimiter());
|
||||
assertFalse(csvFormat.getTrim());
|
||||
|
||||
assertTrue(cSVFormat.isQuoteCharacterSet());
|
||||
assertEquals("\\N", cSVFormat.getNullString());
|
||||
assertTrue(csvFormat.isQuoteCharacterSet());
|
||||
assertEquals("\\N", csvFormat.getNullString());
|
||||
|
||||
assertFalse(cSVFormat.getIgnoreHeaderCase());
|
||||
assertTrue(cSVFormat.isEscapeCharacterSet());
|
||||
assertFalse(csvFormat.getIgnoreHeaderCase());
|
||||
assertTrue(csvFormat.isEscapeCharacterSet());
|
||||
|
||||
assertFalse(cSVFormat.isCommentMarkerSet());
|
||||
assertNull(cSVFormat.getCommentMarker());
|
||||
assertFalse(csvFormat.isCommentMarkerSet());
|
||||
assertNull(csvFormat.getCommentMarker());
|
||||
|
||||
assertFalse(cSVFormat.getAllowMissingColumnNames());
|
||||
assertEquals(QuoteMode.ALL_NON_NULL, cSVFormat.getQuoteMode());
|
||||
assertFalse(csvFormat.getAllowMissingColumnNames());
|
||||
assertEquals(QuoteMode.ALL_NON_NULL, csvFormat.getQuoteMode());
|
||||
|
||||
assertEquals('\t', cSVFormat.getDelimiter());
|
||||
assertFalse(cSVFormat.getSkipHeaderRecord());
|
||||
assertEquals('\t', csvFormat.getDelimiter());
|
||||
assertFalse(csvFormat.getSkipHeaderRecord());
|
||||
|
||||
assertEquals("\n", cSVFormat.getRecordSeparator());
|
||||
assertFalse(cSVFormat.getIgnoreEmptyLines());
|
||||
assertEquals("\n", csvFormat.getRecordSeparator());
|
||||
assertFalse(csvFormat.getIgnoreEmptyLines());
|
||||
|
||||
assertEquals('\"', (char)cSVFormat.getQuoteCharacter());
|
||||
assertTrue(cSVFormat.isNullStringSet());
|
||||
assertEquals('\"', (char)csvFormat.getQuoteCharacter());
|
||||
assertTrue(csvFormat.isNullStringSet());
|
||||
|
||||
assertFalse(cSVFormat.equals( null));
|
||||
assertFalse(csvFormat.equals( null));
|
||||
|
||||
}
|
||||
|
||||
|
@ -486,10 +486,10 @@ public class CSVFormatTest {
|
|||
@Test //I assume this to be a defect.
|
||||
public void testFormatThrowsNullPointerException() {
|
||||
|
||||
final CSVFormat cSVFormat = CSVFormat.MYSQL;
|
||||
final CSVFormat csvFormat = CSVFormat.MYSQL;
|
||||
|
||||
try {
|
||||
cSVFormat.format((Object[]) null);
|
||||
csvFormat.format((Object[]) null);
|
||||
fail("Expecting exception: NullPointerException");
|
||||
} catch(final NullPointerException e) {
|
||||
assertEquals(CSVFormat.class.getName(), e.getStackTrace()[0].getClassName());
|
||||
|
@ -513,78 +513,78 @@ public class CSVFormatTest {
|
|||
@Test
|
||||
public void testHashCodeAndWithIgnoreHeaderCase() {
|
||||
|
||||
final CSVFormat cSVFormat = CSVFormat.INFORMIX_UNLOAD_CSV;
|
||||
final CSVFormat cSVFormatTwo = cSVFormat.withIgnoreHeaderCase();
|
||||
cSVFormatTwo.hashCode();
|
||||
final CSVFormat csvFormat = CSVFormat.INFORMIX_UNLOAD_CSV;
|
||||
final CSVFormat csvFormatTwo = csvFormat.withIgnoreHeaderCase();
|
||||
csvFormatTwo.hashCode();
|
||||
|
||||
assertTrue(cSVFormatTwo.getIgnoreHeaderCase());
|
||||
assertFalse(cSVFormatTwo.getTrailingDelimiter());
|
||||
assertTrue(csvFormatTwo.getIgnoreHeaderCase());
|
||||
assertFalse(csvFormatTwo.getTrailingDelimiter());
|
||||
|
||||
assertTrue(cSVFormatTwo.equals(cSVFormat)); // TODO this fails since CSV-242 was applied. Why should they compare equal?
|
||||
assertFalse(cSVFormatTwo.getAllowMissingColumnNames());
|
||||
assertTrue(csvFormatTwo.equals(csvFormat)); // TODO this fails since CSV-242 was applied. Why should they compare equal?
|
||||
assertFalse(csvFormatTwo.getAllowMissingColumnNames());
|
||||
|
||||
assertFalse(cSVFormatTwo.getTrim());
|
||||
assertFalse(csvFormatTwo.getTrim());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNewFormat() {
|
||||
|
||||
final CSVFormat cSVFormat = CSVFormat.newFormat('X');
|
||||
final CSVFormat csvFormat = CSVFormat.newFormat('X');
|
||||
|
||||
assertFalse(cSVFormat.getSkipHeaderRecord());
|
||||
assertFalse(cSVFormat.isEscapeCharacterSet());
|
||||
assertFalse(csvFormat.getSkipHeaderRecord());
|
||||
assertFalse(csvFormat.isEscapeCharacterSet());
|
||||
|
||||
assertNull(cSVFormat.getRecordSeparator());
|
||||
assertNull(cSVFormat.getQuoteMode());
|
||||
assertNull(csvFormat.getRecordSeparator());
|
||||
assertNull(csvFormat.getQuoteMode());
|
||||
|
||||
assertNull(cSVFormat.getCommentMarker());
|
||||
assertFalse(cSVFormat.getIgnoreHeaderCase());
|
||||
assertNull(csvFormat.getCommentMarker());
|
||||
assertFalse(csvFormat.getIgnoreHeaderCase());
|
||||
|
||||
assertFalse(cSVFormat.getAllowMissingColumnNames());
|
||||
assertFalse(cSVFormat.getTrim());
|
||||
assertFalse(csvFormat.getAllowMissingColumnNames());
|
||||
assertFalse(csvFormat.getTrim());
|
||||
|
||||
assertFalse(cSVFormat.isNullStringSet());
|
||||
assertNull(cSVFormat.getEscapeCharacter());
|
||||
assertFalse(csvFormat.isNullStringSet());
|
||||
assertNull(csvFormat.getEscapeCharacter());
|
||||
|
||||
assertFalse(cSVFormat.getIgnoreSurroundingSpaces());
|
||||
assertFalse(cSVFormat.getTrailingDelimiter());
|
||||
assertFalse(csvFormat.getIgnoreSurroundingSpaces());
|
||||
assertFalse(csvFormat.getTrailingDelimiter());
|
||||
|
||||
assertEquals('X', cSVFormat.getDelimiter());
|
||||
assertNull(cSVFormat.getNullString());
|
||||
assertEquals('X', csvFormat.getDelimiter());
|
||||
assertNull(csvFormat.getNullString());
|
||||
|
||||
assertFalse(cSVFormat.isQuoteCharacterSet());
|
||||
assertFalse(cSVFormat.isCommentMarkerSet());
|
||||
assertFalse(csvFormat.isQuoteCharacterSet());
|
||||
assertFalse(csvFormat.isCommentMarkerSet());
|
||||
|
||||
assertNull(cSVFormat.getQuoteCharacter());
|
||||
assertFalse(cSVFormat.getIgnoreEmptyLines());
|
||||
assertNull(csvFormat.getQuoteCharacter());
|
||||
assertFalse(csvFormat.getIgnoreEmptyLines());
|
||||
|
||||
assertFalse(cSVFormat.getSkipHeaderRecord());
|
||||
assertFalse(cSVFormat.isEscapeCharacterSet());
|
||||
assertFalse(csvFormat.getSkipHeaderRecord());
|
||||
assertFalse(csvFormat.isEscapeCharacterSet());
|
||||
|
||||
assertNull(cSVFormat.getRecordSeparator());
|
||||
assertNull(cSVFormat.getQuoteMode());
|
||||
assertNull(csvFormat.getRecordSeparator());
|
||||
assertNull(csvFormat.getQuoteMode());
|
||||
|
||||
assertNull(cSVFormat.getCommentMarker());
|
||||
assertFalse(cSVFormat.getIgnoreHeaderCase());
|
||||
assertNull(csvFormat.getCommentMarker());
|
||||
assertFalse(csvFormat.getIgnoreHeaderCase());
|
||||
|
||||
assertFalse(cSVFormat.getAllowMissingColumnNames());
|
||||
assertFalse(cSVFormat.getTrim());
|
||||
assertFalse(csvFormat.getAllowMissingColumnNames());
|
||||
assertFalse(csvFormat.getTrim());
|
||||
|
||||
assertFalse(cSVFormat.isNullStringSet());
|
||||
assertNull(cSVFormat.getEscapeCharacter());
|
||||
assertFalse(csvFormat.isNullStringSet());
|
||||
assertNull(csvFormat.getEscapeCharacter());
|
||||
|
||||
assertFalse(cSVFormat.getIgnoreSurroundingSpaces());
|
||||
assertFalse(cSVFormat.getTrailingDelimiter());
|
||||
assertFalse(csvFormat.getIgnoreSurroundingSpaces());
|
||||
assertFalse(csvFormat.getTrailingDelimiter());
|
||||
|
||||
assertEquals('X', cSVFormat.getDelimiter());
|
||||
assertNull(cSVFormat.getNullString());
|
||||
assertEquals('X', csvFormat.getDelimiter());
|
||||
assertNull(csvFormat.getNullString());
|
||||
|
||||
assertFalse(cSVFormat.isQuoteCharacterSet());
|
||||
assertFalse(cSVFormat.isCommentMarkerSet());
|
||||
assertFalse(csvFormat.isQuoteCharacterSet());
|
||||
assertFalse(csvFormat.isCommentMarkerSet());
|
||||
|
||||
assertNull(cSVFormat.getQuoteCharacter());
|
||||
assertFalse(cSVFormat.getIgnoreEmptyLines());
|
||||
assertNull(csvFormat.getQuoteCharacter());
|
||||
assertFalse(csvFormat.getIgnoreEmptyLines());
|
||||
|
||||
}
|
||||
|
||||
|
@ -663,162 +663,162 @@ public class CSVFormatTest {
|
|||
@Test
|
||||
public void testToStringAndWithCommentMarkerTakingCharacter() {
|
||||
|
||||
final CSVFormat.Predefined cSVFormat_Predefined = CSVFormat.Predefined.Default;
|
||||
final CSVFormat cSVFormat = cSVFormat_Predefined.getFormat();
|
||||
final CSVFormat.Predefined csvFormat_Predefined = CSVFormat.Predefined.Default;
|
||||
final CSVFormat csvFormat = csvFormat_Predefined.getFormat();
|
||||
|
||||
assertNull(cSVFormat.getEscapeCharacter());
|
||||
assertTrue(cSVFormat.isQuoteCharacterSet());
|
||||
assertNull(csvFormat.getEscapeCharacter());
|
||||
assertTrue(csvFormat.isQuoteCharacterSet());
|
||||
|
||||
assertFalse(cSVFormat.getTrim());
|
||||
assertFalse(cSVFormat.getIgnoreSurroundingSpaces());
|
||||
assertFalse(csvFormat.getTrim());
|
||||
assertFalse(csvFormat.getIgnoreSurroundingSpaces());
|
||||
|
||||
assertFalse(cSVFormat.getTrailingDelimiter());
|
||||
assertEquals(',', cSVFormat.getDelimiter());
|
||||
assertFalse(csvFormat.getTrailingDelimiter());
|
||||
assertEquals(',', csvFormat.getDelimiter());
|
||||
|
||||
assertFalse(cSVFormat.getIgnoreHeaderCase());
|
||||
assertEquals("\r\n", cSVFormat.getRecordSeparator());
|
||||
assertFalse(csvFormat.getIgnoreHeaderCase());
|
||||
assertEquals("\r\n", csvFormat.getRecordSeparator());
|
||||
|
||||
assertFalse(cSVFormat.isCommentMarkerSet());
|
||||
assertNull(cSVFormat.getCommentMarker());
|
||||
assertFalse(csvFormat.isCommentMarkerSet());
|
||||
assertNull(csvFormat.getCommentMarker());
|
||||
|
||||
assertFalse(cSVFormat.isNullStringSet());
|
||||
assertFalse(cSVFormat.getAllowMissingColumnNames());
|
||||
assertFalse(csvFormat.isNullStringSet());
|
||||
assertFalse(csvFormat.getAllowMissingColumnNames());
|
||||
|
||||
assertFalse(cSVFormat.isEscapeCharacterSet());
|
||||
assertFalse(cSVFormat.getSkipHeaderRecord());
|
||||
assertFalse(csvFormat.isEscapeCharacterSet());
|
||||
assertFalse(csvFormat.getSkipHeaderRecord());
|
||||
|
||||
assertNull(cSVFormat.getNullString());
|
||||
assertNull(cSVFormat.getQuoteMode());
|
||||
assertNull(csvFormat.getNullString());
|
||||
assertNull(csvFormat.getQuoteMode());
|
||||
|
||||
assertTrue(cSVFormat.getIgnoreEmptyLines());
|
||||
assertEquals('\"', (char)cSVFormat.getQuoteCharacter());
|
||||
assertTrue(csvFormat.getIgnoreEmptyLines());
|
||||
assertEquals('\"', (char)csvFormat.getQuoteCharacter());
|
||||
|
||||
final Character character = Character.valueOf('n');
|
||||
|
||||
final CSVFormat cSVFormatTwo = cSVFormat.withCommentMarker(character);
|
||||
final CSVFormat csvFormatTwo = csvFormat.withCommentMarker(character);
|
||||
|
||||
assertNull(cSVFormat.getEscapeCharacter());
|
||||
assertTrue(cSVFormat.isQuoteCharacterSet());
|
||||
assertNull(csvFormat.getEscapeCharacter());
|
||||
assertTrue(csvFormat.isQuoteCharacterSet());
|
||||
|
||||
assertFalse(cSVFormat.getTrim());
|
||||
assertFalse(cSVFormat.getIgnoreSurroundingSpaces());
|
||||
assertFalse(csvFormat.getTrim());
|
||||
assertFalse(csvFormat.getIgnoreSurroundingSpaces());
|
||||
|
||||
assertFalse(cSVFormat.getTrailingDelimiter());
|
||||
assertEquals(',', cSVFormat.getDelimiter());
|
||||
assertFalse(csvFormat.getTrailingDelimiter());
|
||||
assertEquals(',', csvFormat.getDelimiter());
|
||||
|
||||
assertFalse(cSVFormat.getIgnoreHeaderCase());
|
||||
assertEquals("\r\n", cSVFormat.getRecordSeparator());
|
||||
assertFalse(csvFormat.getIgnoreHeaderCase());
|
||||
assertEquals("\r\n", csvFormat.getRecordSeparator());
|
||||
|
||||
assertFalse(cSVFormat.isCommentMarkerSet());
|
||||
assertNull(cSVFormat.getCommentMarker());
|
||||
assertFalse(csvFormat.isCommentMarkerSet());
|
||||
assertNull(csvFormat.getCommentMarker());
|
||||
|
||||
assertFalse(cSVFormat.isNullStringSet());
|
||||
assertFalse(cSVFormat.getAllowMissingColumnNames());
|
||||
assertFalse(csvFormat.isNullStringSet());
|
||||
assertFalse(csvFormat.getAllowMissingColumnNames());
|
||||
|
||||
assertFalse(cSVFormat.isEscapeCharacterSet());
|
||||
assertFalse(cSVFormat.getSkipHeaderRecord());
|
||||
assertFalse(csvFormat.isEscapeCharacterSet());
|
||||
assertFalse(csvFormat.getSkipHeaderRecord());
|
||||
|
||||
assertNull(cSVFormat.getNullString());
|
||||
assertNull(cSVFormat.getQuoteMode());
|
||||
assertNull(csvFormat.getNullString());
|
||||
assertNull(csvFormat.getQuoteMode());
|
||||
|
||||
assertTrue(cSVFormat.getIgnoreEmptyLines());
|
||||
assertEquals('\"', (char)cSVFormat.getQuoteCharacter());
|
||||
assertTrue(csvFormat.getIgnoreEmptyLines());
|
||||
assertEquals('\"', (char)csvFormat.getQuoteCharacter());
|
||||
|
||||
assertFalse(cSVFormatTwo.isNullStringSet());
|
||||
assertFalse(cSVFormatTwo.getAllowMissingColumnNames());
|
||||
assertFalse(csvFormatTwo.isNullStringSet());
|
||||
assertFalse(csvFormatTwo.getAllowMissingColumnNames());
|
||||
|
||||
assertEquals('\"', (char)cSVFormatTwo.getQuoteCharacter());
|
||||
assertNull(cSVFormatTwo.getNullString());
|
||||
assertEquals('\"', (char)csvFormatTwo.getQuoteCharacter());
|
||||
assertNull(csvFormatTwo.getNullString());
|
||||
|
||||
assertEquals(',', cSVFormatTwo.getDelimiter());
|
||||
assertFalse(cSVFormatTwo.getTrailingDelimiter());
|
||||
assertEquals(',', csvFormatTwo.getDelimiter());
|
||||
assertFalse(csvFormatTwo.getTrailingDelimiter());
|
||||
|
||||
assertTrue(cSVFormatTwo.isCommentMarkerSet());
|
||||
assertFalse(cSVFormatTwo.getIgnoreHeaderCase());
|
||||
assertTrue(csvFormatTwo.isCommentMarkerSet());
|
||||
assertFalse(csvFormatTwo.getIgnoreHeaderCase());
|
||||
|
||||
assertFalse(cSVFormatTwo.getTrim());
|
||||
assertNull(cSVFormatTwo.getEscapeCharacter());
|
||||
assertFalse(csvFormatTwo.getTrim());
|
||||
assertNull(csvFormatTwo.getEscapeCharacter());
|
||||
|
||||
assertTrue(cSVFormatTwo.isQuoteCharacterSet());
|
||||
assertFalse(cSVFormatTwo.getIgnoreSurroundingSpaces());
|
||||
assertTrue(csvFormatTwo.isQuoteCharacterSet());
|
||||
assertFalse(csvFormatTwo.getIgnoreSurroundingSpaces());
|
||||
|
||||
assertEquals("\r\n", cSVFormatTwo.getRecordSeparator());
|
||||
assertNull(cSVFormatTwo.getQuoteMode());
|
||||
assertEquals("\r\n", csvFormatTwo.getRecordSeparator());
|
||||
assertNull(csvFormatTwo.getQuoteMode());
|
||||
|
||||
assertEquals('n', (char)cSVFormatTwo.getCommentMarker());
|
||||
assertFalse(cSVFormatTwo.getSkipHeaderRecord());
|
||||
assertEquals('n', (char)csvFormatTwo.getCommentMarker());
|
||||
assertFalse(csvFormatTwo.getSkipHeaderRecord());
|
||||
|
||||
assertFalse(cSVFormatTwo.isEscapeCharacterSet());
|
||||
assertTrue(cSVFormatTwo.getIgnoreEmptyLines());
|
||||
assertFalse(csvFormatTwo.isEscapeCharacterSet());
|
||||
assertTrue(csvFormatTwo.getIgnoreEmptyLines());
|
||||
|
||||
assertNotSame(cSVFormat, cSVFormatTwo);
|
||||
assertNotSame(cSVFormatTwo, cSVFormat);
|
||||
assertNotSame(csvFormat, csvFormatTwo);
|
||||
assertNotSame(csvFormatTwo, csvFormat);
|
||||
|
||||
assertFalse(cSVFormatTwo.equals(cSVFormat));
|
||||
assertFalse(csvFormatTwo.equals(csvFormat));
|
||||
|
||||
assertNull(cSVFormat.getEscapeCharacter());
|
||||
assertTrue(cSVFormat.isQuoteCharacterSet());
|
||||
assertNull(csvFormat.getEscapeCharacter());
|
||||
assertTrue(csvFormat.isQuoteCharacterSet());
|
||||
|
||||
assertFalse(cSVFormat.getTrim());
|
||||
assertFalse(cSVFormat.getIgnoreSurroundingSpaces());
|
||||
assertFalse(csvFormat.getTrim());
|
||||
assertFalse(csvFormat.getIgnoreSurroundingSpaces());
|
||||
|
||||
assertFalse(cSVFormat.getTrailingDelimiter());
|
||||
assertEquals(',', cSVFormat.getDelimiter());
|
||||
assertFalse(csvFormat.getTrailingDelimiter());
|
||||
assertEquals(',', csvFormat.getDelimiter());
|
||||
|
||||
assertFalse(cSVFormat.getIgnoreHeaderCase());
|
||||
assertEquals("\r\n", cSVFormat.getRecordSeparator());
|
||||
assertFalse(csvFormat.getIgnoreHeaderCase());
|
||||
assertEquals("\r\n", csvFormat.getRecordSeparator());
|
||||
|
||||
assertFalse(cSVFormat.isCommentMarkerSet());
|
||||
assertNull(cSVFormat.getCommentMarker());
|
||||
assertFalse(csvFormat.isCommentMarkerSet());
|
||||
assertNull(csvFormat.getCommentMarker());
|
||||
|
||||
assertFalse(cSVFormat.isNullStringSet());
|
||||
assertFalse(cSVFormat.getAllowMissingColumnNames());
|
||||
assertFalse(csvFormat.isNullStringSet());
|
||||
assertFalse(csvFormat.getAllowMissingColumnNames());
|
||||
|
||||
assertFalse(cSVFormat.isEscapeCharacterSet());
|
||||
assertFalse(cSVFormat.getSkipHeaderRecord());
|
||||
assertFalse(csvFormat.isEscapeCharacterSet());
|
||||
assertFalse(csvFormat.getSkipHeaderRecord());
|
||||
|
||||
assertNull(cSVFormat.getNullString());
|
||||
assertNull(cSVFormat.getQuoteMode());
|
||||
assertNull(csvFormat.getNullString());
|
||||
assertNull(csvFormat.getQuoteMode());
|
||||
|
||||
assertTrue(cSVFormat.getIgnoreEmptyLines());
|
||||
assertEquals('\"', (char)cSVFormat.getQuoteCharacter());
|
||||
assertTrue(csvFormat.getIgnoreEmptyLines());
|
||||
assertEquals('\"', (char)csvFormat.getQuoteCharacter());
|
||||
|
||||
assertFalse(cSVFormatTwo.isNullStringSet());
|
||||
assertFalse(cSVFormatTwo.getAllowMissingColumnNames());
|
||||
assertFalse(csvFormatTwo.isNullStringSet());
|
||||
assertFalse(csvFormatTwo.getAllowMissingColumnNames());
|
||||
|
||||
assertEquals('\"', (char)cSVFormatTwo.getQuoteCharacter());
|
||||
assertNull(cSVFormatTwo.getNullString());
|
||||
assertEquals('\"', (char)csvFormatTwo.getQuoteCharacter());
|
||||
assertNull(csvFormatTwo.getNullString());
|
||||
|
||||
assertEquals(',', cSVFormatTwo.getDelimiter());
|
||||
assertFalse(cSVFormatTwo.getTrailingDelimiter());
|
||||
assertEquals(',', csvFormatTwo.getDelimiter());
|
||||
assertFalse(csvFormatTwo.getTrailingDelimiter());
|
||||
|
||||
assertTrue(cSVFormatTwo.isCommentMarkerSet());
|
||||
assertFalse(cSVFormatTwo.getIgnoreHeaderCase());
|
||||
assertTrue(csvFormatTwo.isCommentMarkerSet());
|
||||
assertFalse(csvFormatTwo.getIgnoreHeaderCase());
|
||||
|
||||
assertFalse(cSVFormatTwo.getTrim());
|
||||
assertNull(cSVFormatTwo.getEscapeCharacter());
|
||||
assertFalse(csvFormatTwo.getTrim());
|
||||
assertNull(csvFormatTwo.getEscapeCharacter());
|
||||
|
||||
assertTrue(cSVFormatTwo.isQuoteCharacterSet());
|
||||
assertFalse(cSVFormatTwo.getIgnoreSurroundingSpaces());
|
||||
assertTrue(csvFormatTwo.isQuoteCharacterSet());
|
||||
assertFalse(csvFormatTwo.getIgnoreSurroundingSpaces());
|
||||
|
||||
assertEquals("\r\n", cSVFormatTwo.getRecordSeparator());
|
||||
assertNull(cSVFormatTwo.getQuoteMode());
|
||||
assertEquals("\r\n", csvFormatTwo.getRecordSeparator());
|
||||
assertNull(csvFormatTwo.getQuoteMode());
|
||||
|
||||
assertEquals('n', (char)cSVFormatTwo.getCommentMarker());
|
||||
assertFalse(cSVFormatTwo.getSkipHeaderRecord());
|
||||
assertEquals('n', (char)csvFormatTwo.getCommentMarker());
|
||||
assertFalse(csvFormatTwo.getSkipHeaderRecord());
|
||||
|
||||
assertFalse(cSVFormatTwo.isEscapeCharacterSet());
|
||||
assertTrue(cSVFormatTwo.getIgnoreEmptyLines());
|
||||
assertFalse(csvFormatTwo.isEscapeCharacterSet());
|
||||
assertTrue(csvFormatTwo.getIgnoreEmptyLines());
|
||||
|
||||
assertNotSame(cSVFormat, cSVFormatTwo);
|
||||
assertNotSame(cSVFormatTwo, cSVFormat);
|
||||
assertNotSame(csvFormat, csvFormatTwo);
|
||||
assertNotSame(csvFormatTwo, csvFormat);
|
||||
|
||||
assertFalse(cSVFormat.equals(cSVFormatTwo));
|
||||
assertFalse(csvFormat.equals(csvFormatTwo));
|
||||
|
||||
assertFalse(cSVFormatTwo.equals(cSVFormat));
|
||||
assertFalse(csvFormatTwo.equals(csvFormat));
|
||||
assertEquals("Delimiter=<,> QuoteChar=<\"> CommentStart=<n> " +
|
||||
"RecordSeparator=<\r\n> EmptyLines:ignored SkipHeaderRecord:false"
|
||||
, cSVFormatTwo.toString());
|
||||
, csvFormatTwo.toString());
|
||||
|
||||
}
|
||||
|
||||
|
@ -880,160 +880,160 @@ public class CSVFormatTest {
|
|||
@Test
|
||||
public void testWithHeaderComments() {
|
||||
|
||||
final CSVFormat cSVFormat = CSVFormat.DEFAULT;
|
||||
final CSVFormat csvFormat = CSVFormat.DEFAULT;
|
||||
|
||||
assertEquals('\"', (char)cSVFormat.getQuoteCharacter());
|
||||
assertFalse(cSVFormat.isCommentMarkerSet());
|
||||
assertEquals('\"', (char)csvFormat.getQuoteCharacter());
|
||||
assertFalse(csvFormat.isCommentMarkerSet());
|
||||
|
||||
assertFalse(cSVFormat.isEscapeCharacterSet());
|
||||
assertTrue(cSVFormat.isQuoteCharacterSet());
|
||||
assertFalse(csvFormat.isEscapeCharacterSet());
|
||||
assertTrue(csvFormat.isQuoteCharacterSet());
|
||||
|
||||
assertFalse(cSVFormat.getSkipHeaderRecord());
|
||||
assertNull(cSVFormat.getQuoteMode());
|
||||
assertFalse(csvFormat.getSkipHeaderRecord());
|
||||
assertNull(csvFormat.getQuoteMode());
|
||||
|
||||
assertEquals(',', cSVFormat.getDelimiter());
|
||||
assertTrue(cSVFormat.getIgnoreEmptyLines());
|
||||
assertEquals(',', csvFormat.getDelimiter());
|
||||
assertTrue(csvFormat.getIgnoreEmptyLines());
|
||||
|
||||
assertFalse(cSVFormat.getIgnoreHeaderCase());
|
||||
assertNull(cSVFormat.getCommentMarker());
|
||||
assertFalse(csvFormat.getIgnoreHeaderCase());
|
||||
assertNull(csvFormat.getCommentMarker());
|
||||
|
||||
assertEquals("\r\n", cSVFormat.getRecordSeparator());
|
||||
assertFalse(cSVFormat.getTrailingDelimiter());
|
||||
assertEquals("\r\n", csvFormat.getRecordSeparator());
|
||||
assertFalse(csvFormat.getTrailingDelimiter());
|
||||
|
||||
assertFalse(cSVFormat.getAllowMissingColumnNames());
|
||||
assertFalse(cSVFormat.getTrim());
|
||||
assertFalse(csvFormat.getAllowMissingColumnNames());
|
||||
assertFalse(csvFormat.getTrim());
|
||||
|
||||
assertFalse(cSVFormat.isNullStringSet());
|
||||
assertNull(cSVFormat.getNullString());
|
||||
assertFalse(csvFormat.isNullStringSet());
|
||||
assertNull(csvFormat.getNullString());
|
||||
|
||||
assertFalse(cSVFormat.getIgnoreSurroundingSpaces());
|
||||
assertNull(cSVFormat.getEscapeCharacter());
|
||||
assertFalse(csvFormat.getIgnoreSurroundingSpaces());
|
||||
assertNull(csvFormat.getEscapeCharacter());
|
||||
|
||||
final Object[] objectArray = new Object[8];
|
||||
final CSVFormat cSVFormatTwo = cSVFormat.withHeaderComments(objectArray);
|
||||
final CSVFormat csvFormatTwo = csvFormat.withHeaderComments(objectArray);
|
||||
|
||||
assertEquals('\"', (char)cSVFormat.getQuoteCharacter());
|
||||
assertFalse(cSVFormat.isCommentMarkerSet());
|
||||
assertEquals('\"', (char)csvFormat.getQuoteCharacter());
|
||||
assertFalse(csvFormat.isCommentMarkerSet());
|
||||
|
||||
assertFalse(cSVFormat.isEscapeCharacterSet());
|
||||
assertTrue(cSVFormat.isQuoteCharacterSet());
|
||||
assertFalse(csvFormat.isEscapeCharacterSet());
|
||||
assertTrue(csvFormat.isQuoteCharacterSet());
|
||||
|
||||
assertFalse(cSVFormat.getSkipHeaderRecord());
|
||||
assertNull(cSVFormat.getQuoteMode());
|
||||
assertFalse(csvFormat.getSkipHeaderRecord());
|
||||
assertNull(csvFormat.getQuoteMode());
|
||||
|
||||
assertEquals(',', cSVFormat.getDelimiter());
|
||||
assertTrue(cSVFormat.getIgnoreEmptyLines());
|
||||
assertEquals(',', csvFormat.getDelimiter());
|
||||
assertTrue(csvFormat.getIgnoreEmptyLines());
|
||||
|
||||
assertFalse(cSVFormat.getIgnoreHeaderCase());
|
||||
assertNull(cSVFormat.getCommentMarker());
|
||||
assertFalse(csvFormat.getIgnoreHeaderCase());
|
||||
assertNull(csvFormat.getCommentMarker());
|
||||
|
||||
assertEquals("\r\n", cSVFormat.getRecordSeparator());
|
||||
assertFalse(cSVFormat.getTrailingDelimiter());
|
||||
assertEquals("\r\n", csvFormat.getRecordSeparator());
|
||||
assertFalse(csvFormat.getTrailingDelimiter());
|
||||
|
||||
assertFalse(cSVFormat.getAllowMissingColumnNames());
|
||||
assertFalse(cSVFormat.getTrim());
|
||||
assertFalse(csvFormat.getAllowMissingColumnNames());
|
||||
assertFalse(csvFormat.getTrim());
|
||||
|
||||
assertFalse(cSVFormat.isNullStringSet());
|
||||
assertNull(cSVFormat.getNullString());
|
||||
assertFalse(csvFormat.isNullStringSet());
|
||||
assertNull(csvFormat.getNullString());
|
||||
|
||||
assertFalse(cSVFormat.getIgnoreSurroundingSpaces());
|
||||
assertNull(cSVFormat.getEscapeCharacter());
|
||||
assertFalse(csvFormat.getIgnoreSurroundingSpaces());
|
||||
assertNull(csvFormat.getEscapeCharacter());
|
||||
|
||||
assertFalse(cSVFormatTwo.getIgnoreHeaderCase());
|
||||
assertNull(cSVFormatTwo.getQuoteMode());
|
||||
assertFalse(csvFormatTwo.getIgnoreHeaderCase());
|
||||
assertNull(csvFormatTwo.getQuoteMode());
|
||||
|
||||
assertTrue(cSVFormatTwo.getIgnoreEmptyLines());
|
||||
assertFalse(cSVFormatTwo.getIgnoreSurroundingSpaces());
|
||||
assertTrue(csvFormatTwo.getIgnoreEmptyLines());
|
||||
assertFalse(csvFormatTwo.getIgnoreSurroundingSpaces());
|
||||
|
||||
assertNull(cSVFormatTwo.getEscapeCharacter());
|
||||
assertFalse(cSVFormatTwo.getTrim());
|
||||
assertNull(csvFormatTwo.getEscapeCharacter());
|
||||
assertFalse(csvFormatTwo.getTrim());
|
||||
|
||||
assertFalse(cSVFormatTwo.isEscapeCharacterSet());
|
||||
assertTrue(cSVFormatTwo.isQuoteCharacterSet());
|
||||
assertFalse(csvFormatTwo.isEscapeCharacterSet());
|
||||
assertTrue(csvFormatTwo.isQuoteCharacterSet());
|
||||
|
||||
assertFalse(cSVFormatTwo.getSkipHeaderRecord());
|
||||
assertEquals('\"', (char)cSVFormatTwo.getQuoteCharacter());
|
||||
assertFalse(csvFormatTwo.getSkipHeaderRecord());
|
||||
assertEquals('\"', (char)csvFormatTwo.getQuoteCharacter());
|
||||
|
||||
assertFalse(cSVFormatTwo.getAllowMissingColumnNames());
|
||||
assertNull(cSVFormatTwo.getNullString());
|
||||
assertFalse(csvFormatTwo.getAllowMissingColumnNames());
|
||||
assertNull(csvFormatTwo.getNullString());
|
||||
|
||||
assertFalse(cSVFormatTwo.isNullStringSet());
|
||||
assertFalse(cSVFormatTwo.getTrailingDelimiter());
|
||||
assertFalse(csvFormatTwo.isNullStringSet());
|
||||
assertFalse(csvFormatTwo.getTrailingDelimiter());
|
||||
|
||||
assertEquals("\r\n", cSVFormatTwo.getRecordSeparator());
|
||||
assertEquals(',', cSVFormatTwo.getDelimiter());
|
||||
assertEquals("\r\n", csvFormatTwo.getRecordSeparator());
|
||||
assertEquals(',', csvFormatTwo.getDelimiter());
|
||||
|
||||
assertNull(cSVFormatTwo.getCommentMarker());
|
||||
assertFalse(cSVFormatTwo.isCommentMarkerSet());
|
||||
assertNull(csvFormatTwo.getCommentMarker());
|
||||
assertFalse(csvFormatTwo.isCommentMarkerSet());
|
||||
|
||||
assertNotSame(cSVFormat, cSVFormatTwo);
|
||||
assertNotSame(cSVFormatTwo, cSVFormat);
|
||||
assertNotSame(csvFormat, csvFormatTwo);
|
||||
assertNotSame(csvFormatTwo, csvFormat);
|
||||
|
||||
assertTrue(cSVFormatTwo.equals(cSVFormat)); // TODO this fails since CSV-242 was applied. Why should the formats compare equal?
|
||||
assertTrue(csvFormatTwo.equals(csvFormat)); // TODO this fails since CSV-242 was applied. Why should the formats compare equal?
|
||||
|
||||
final String string = cSVFormatTwo.format(objectArray);
|
||||
final String string = csvFormatTwo.format(objectArray);
|
||||
|
||||
assertEquals('\"', (char)cSVFormat.getQuoteCharacter());
|
||||
assertFalse(cSVFormat.isCommentMarkerSet());
|
||||
assertEquals('\"', (char)csvFormat.getQuoteCharacter());
|
||||
assertFalse(csvFormat.isCommentMarkerSet());
|
||||
|
||||
assertFalse(cSVFormat.isEscapeCharacterSet());
|
||||
assertTrue(cSVFormat.isQuoteCharacterSet());
|
||||
assertFalse(csvFormat.isEscapeCharacterSet());
|
||||
assertTrue(csvFormat.isQuoteCharacterSet());
|
||||
|
||||
assertFalse(cSVFormat.getSkipHeaderRecord());
|
||||
assertNull(cSVFormat.getQuoteMode());
|
||||
assertFalse(csvFormat.getSkipHeaderRecord());
|
||||
assertNull(csvFormat.getQuoteMode());
|
||||
|
||||
assertEquals(',', cSVFormat.getDelimiter());
|
||||
assertTrue(cSVFormat.getIgnoreEmptyLines());
|
||||
assertEquals(',', csvFormat.getDelimiter());
|
||||
assertTrue(csvFormat.getIgnoreEmptyLines());
|
||||
|
||||
assertFalse(cSVFormat.getIgnoreHeaderCase());
|
||||
assertNull(cSVFormat.getCommentMarker());
|
||||
assertFalse(csvFormat.getIgnoreHeaderCase());
|
||||
assertNull(csvFormat.getCommentMarker());
|
||||
|
||||
assertEquals("\r\n", cSVFormat.getRecordSeparator());
|
||||
assertFalse(cSVFormat.getTrailingDelimiter());
|
||||
assertEquals("\r\n", csvFormat.getRecordSeparator());
|
||||
assertFalse(csvFormat.getTrailingDelimiter());
|
||||
|
||||
assertFalse(cSVFormat.getAllowMissingColumnNames());
|
||||
assertFalse(cSVFormat.getTrim());
|
||||
assertFalse(csvFormat.getAllowMissingColumnNames());
|
||||
assertFalse(csvFormat.getTrim());
|
||||
|
||||
assertFalse(cSVFormat.isNullStringSet());
|
||||
assertNull(cSVFormat.getNullString());
|
||||
assertFalse(csvFormat.isNullStringSet());
|
||||
assertNull(csvFormat.getNullString());
|
||||
|
||||
assertFalse(cSVFormat.getIgnoreSurroundingSpaces());
|
||||
assertNull(cSVFormat.getEscapeCharacter());
|
||||
assertFalse(csvFormat.getIgnoreSurroundingSpaces());
|
||||
assertNull(csvFormat.getEscapeCharacter());
|
||||
|
||||
assertFalse(cSVFormatTwo.getIgnoreHeaderCase());
|
||||
assertNull(cSVFormatTwo.getQuoteMode());
|
||||
assertFalse(csvFormatTwo.getIgnoreHeaderCase());
|
||||
assertNull(csvFormatTwo.getQuoteMode());
|
||||
|
||||
assertTrue(cSVFormatTwo.getIgnoreEmptyLines());
|
||||
assertFalse(cSVFormatTwo.getIgnoreSurroundingSpaces());
|
||||
assertTrue(csvFormatTwo.getIgnoreEmptyLines());
|
||||
assertFalse(csvFormatTwo.getIgnoreSurroundingSpaces());
|
||||
|
||||
assertNull(cSVFormatTwo.getEscapeCharacter());
|
||||
assertFalse(cSVFormatTwo.getTrim());
|
||||
assertNull(csvFormatTwo.getEscapeCharacter());
|
||||
assertFalse(csvFormatTwo.getTrim());
|
||||
|
||||
assertFalse(cSVFormatTwo.isEscapeCharacterSet());
|
||||
assertTrue(cSVFormatTwo.isQuoteCharacterSet());
|
||||
assertFalse(csvFormatTwo.isEscapeCharacterSet());
|
||||
assertTrue(csvFormatTwo.isQuoteCharacterSet());
|
||||
|
||||
assertFalse(cSVFormatTwo.getSkipHeaderRecord());
|
||||
assertEquals('\"', (char)cSVFormatTwo.getQuoteCharacter());
|
||||
assertFalse(csvFormatTwo.getSkipHeaderRecord());
|
||||
assertEquals('\"', (char)csvFormatTwo.getQuoteCharacter());
|
||||
|
||||
assertFalse(cSVFormatTwo.getAllowMissingColumnNames());
|
||||
assertNull(cSVFormatTwo.getNullString());
|
||||
assertFalse(csvFormatTwo.getAllowMissingColumnNames());
|
||||
assertNull(csvFormatTwo.getNullString());
|
||||
|
||||
assertFalse(cSVFormatTwo.isNullStringSet());
|
||||
assertFalse(cSVFormatTwo.getTrailingDelimiter());
|
||||
assertFalse(csvFormatTwo.isNullStringSet());
|
||||
assertFalse(csvFormatTwo.getTrailingDelimiter());
|
||||
|
||||
assertEquals("\r\n", cSVFormatTwo.getRecordSeparator());
|
||||
assertEquals(',', cSVFormatTwo.getDelimiter());
|
||||
assertEquals("\r\n", csvFormatTwo.getRecordSeparator());
|
||||
assertEquals(',', csvFormatTwo.getDelimiter());
|
||||
|
||||
assertNull(cSVFormatTwo.getCommentMarker());
|
||||
assertFalse(cSVFormatTwo.isCommentMarkerSet());
|
||||
assertNull(csvFormatTwo.getCommentMarker());
|
||||
assertFalse(csvFormatTwo.isCommentMarkerSet());
|
||||
|
||||
assertNotSame(cSVFormat, cSVFormatTwo);
|
||||
assertNotSame(cSVFormatTwo, cSVFormat);
|
||||
assertNotSame(csvFormat, csvFormatTwo);
|
||||
assertNotSame(csvFormatTwo, csvFormat);
|
||||
|
||||
assertNotNull(string);
|
||||
assertTrue(cSVFormat.equals(cSVFormatTwo));
|
||||
assertTrue(csvFormat.equals(csvFormatTwo));
|
||||
|
||||
assertTrue(cSVFormatTwo.equals(cSVFormat));
|
||||
assertTrue(csvFormatTwo.equals(csvFormat));
|
||||
assertEquals(",,,,,,,", string);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue