public class CSVParserTest extends Object
| Constructor and Description |
|---|
CSVParserTest() |
@BeforeAll public static void storeSystemLocale()
@AfterEach public void setSystemLocaleBackToDefault()
@BeforeEach public void setUp()
@Test
public void parseSimpleString()
throws IOException
IOException@Test
public void parseEscapingTheEscapeCharacter()
throws IOException
IOException@Test
public void parseEscapingTheSeparatorCharacter()
throws IOException
IOException@Test
public void parseEscapingTheSeparatorCharacterWithoutQuotes()
throws IOException
IOException@Test
public void parseEscapingTheFirstCharacter()
throws IOException
IOException@Test
public void parseSimpleQuotedString()
throws IOException
IOException@Test
public void parseSimpleQuotedStringWithSpaces()
throws IOException
IOException@Test
public void testParsedLineWithInternalQuote()
throws IOException
IOException - if bad things happen@Test
public void parseQuotedStringWithCommas()
throws IOException
IOException@Test
public void parseQuotedStringWithDefinedSeparator()
throws IOException
IOException@Test
public void parseQuotedStringWithDefinedSeparatorAndQuote()
throws IOException
IOException@Test
public void parseEmptyElements()
throws IOException
IOException@Test
public void parseMultiLinedQuoted()
throws IOException
IOException@Test
public void parseMultiLinedQuotedWithCarriageReturns()
throws IOException
IOException@Test
public void testADoubleQuoteAsDataElement()
throws IOException
IOException@Test
public void testEscapedDoubleQuoteAsDataElement()
throws IOException
IOException@Test
public void parseQuotedQuoteCharacters()
throws IOException
IOException@Test
public void parseMultipleQuotes()
throws IOException
IOException@Test
public void parseTrickyString()
throws IOException
IOException@Test
public void testAMultiLineInsideQuotes()
throws IOException
IOException@Test
public void testStrictQuoteSimple()
throws IOException
IOException@Test
public void testNotStrictQuoteSimple()
throws IOException
IOException@Test
public void testStrictQuoteWithSpacesAndTabs()
throws IOException
IOException@Test
public void testNotStrictQuoteWithSpacesAndTabs()
throws IOException
IOException - But not really@Test
public void testStrictQuoteWithGarbage()
throws IOException
IOException@Test
public void testCanIgnoreQuotations()
throws IOException
IOException@Test public void testFalseIgnoreQuotations()
@Test
public void testIssue3314579()
throws IOException
So we want to keep that quote as part of the field and not as the start or end of a field.
Test data are as follows.
RPO;2012;P; ; ; ;SDX;ACCESSORY WHEEL, 16", ALUMINUM, DESIGN 1
RPO;2012;P; ; ; ;SDZ;ACCESSORY WHEEL - 17" - ALLOY - DESIGN 1
IOException - But not really@Test
public void testIssue2263439()
throws IOException
IOException - But not really@Test
public void testIssue2859181()
throws IOException
IOException - But not really@Test
public void testIssue2726363()
throws IOException
Data given:
"804503689","London",""London""shop","address","116.453182","39.918884"
"453074125","NewYork","brief","address"","121.514683","31.228511"
IOException - But not really@Test public void anIOExceptionThrownIfStringEndsInsideAQuotedString()
@Test
public void parseLineMultiAllowsQuotesAcrossMultipleLines()
throws IOException
IOException@Test
public void pendingIsClearedAfterCallToParseLine()
throws IOException
IOException@Test
public void returnPendingIfNullIsPassedIntoParseLineMulti()
throws IOException
IOException@Test
public void spacesAtEndOfQuotedStringDoNotCountIfStrictQuotesIsTrue()
throws IOException
IOException@Test
public void returnNullWhenNullPassedIn()
throws IOException
IOException@Test public void validateEscapeStringBeforeRealTest()
@Test public void whichCharactersAreEscapable()
@Test
public void whitespaceBeforeEscape()
throws IOException
IOException@Test
public void testIssue2958242WithoutQuotes()
throws IOException
IOException@Test public void quoteAndEscapeCannotBeTheSame()
@Test public void quoteAndEscapeCanBeTheSameIfNull()
@Test public void separatorCharacterCannotBeNull()
@Test public void separatorAndEscapeCannotBeTheSame()
@Test public void separatorAndQuoteCannotBeTheSame()
@Test public void shouldSupportPortugueseLocale()
@Test
public void parserHandlesNullInString()
throws IOException
IOException@Test
public void featureRequest60ByDefaultEmptyFieldsAreBlank()
throws IOException
IOException@Test
public void featureRequest60TreatEmptyFieldsAsNull()
throws IOException
IOException@Test
public void featureRequest60TreatEmptyDelimitedFieldsAsNull()
throws IOException
IOException@Test
public void featureRequest60TreatEmptyFieldsDelimitedOrNotAsNull()
throws IOException
IOException@Test
public void testStrictQuotesEndsFieldAtQuote()
throws IOException
IOException@Test
public void testStrictQuotesEndsFieldAtQuoteWithEscapedQuoteInMiddle()
throws IOException
IOException@Test
public void testNotStrictQuotesAllowsEmbeddedEscapedQuote()
throws IOException
IOException@Test
public void testNotStrictQuotesAllowsEmbeddedQuote()
throws IOException
IOException@Test
public void issue93ParsingEmptyDoubleQuoteField()
throws IOException
IOException@Test public void parseToLineApplyQuotesToAllIsFalse()
@Test public void parseToLineApplyQuotesToAllIsTrue()
@Test public void parseToLineUsesCorrectSeparator()
@Test
public void testMultilineLimitBrokeErrorDetailWithQuoteBegin()
throws IOException,
com.opencsv.exceptions.CsvValidationException
IOException - Nevercom.opencsv.exceptions.CsvValidationException@Test
public void testMultilineLimitBrokeErrorDetailWithQuoteMiddle()
throws IOException,
com.opencsv.exceptions.CsvValidationException
IOException - Nevercom.opencsv.exceptions.CsvValidationException@Test
public void testMultilineLimitBrokeErrorDetailWithQuoteEnd()
throws IOException,
com.opencsv.exceptions.CsvValidationException
IOException - Nevercom.opencsv.exceptions.CsvValidationException@Test
@DisplayName(value="handling of an empty string")
public void testEmptyString()
throws IOException
IOExceptionCopyright © 2005–2025. All rights reserved.