au.com.bytecode.opencsv
Class CSVReaderTest

java.lang.Object
  extended by au.com.bytecode.opencsv.CSVReaderTest

public class CSVReaderTest
extends Object


Constructor Summary
CSVReaderTest()
           
 
Method Summary
 void parseQuotedStringWithDefinedSeperator()
           
 void setUp()
          Setup the test.
 void testASingleQuoteAsDataElement()
          Same as testADoubleQuoteAsDataElement but I changed the quotechar to a single quote.
 void testASingleQuoteAsDataElementWithEmptyField()
          Same as testADoubleQuoteAsDataElement but I changed the quotechar to a single quote.
 void testEscapedEscape()
           
 void testEscapedQuote()
           
 void testNormalParsedLine()
          Test a normal non quoted line with three elements
 void testOptionalConstructors()
          Tests constructors with optional delimiters and optional quote char.
 void testParseAll()
          Test parsing to a list.
 void testParseLine()
          Tests iterating over a reader.
 void testParseLineStrictQuote()
           
 void testQuotedParsedLine()
          Test a normal line with three elements and all elements are quoted
 void testSingleQuoteWhenDoubleQuoteIsQuoteChar()
          Test a line where one of the elements is two single quotes and the quote character is the default double quote.
 void testSkippingLines()
          Tests option to skip the first few lines of a file.
 void testSkippingLinesWithDifferentEscape()
          Tests option to skip the first few lines of a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSVReaderTest

public CSVReaderTest()
Method Detail

setUp

public void setUp()
           throws Exception
Setup the test.

Throws:
Exception

testParseLine

public void testParseLine()
                   throws IOException
Tests iterating over a reader.

Throws:
IOException - if the reader fails.

testParseLineStrictQuote

public void testParseLineStrictQuote()
                              throws IOException
Throws:
IOException

testParseAll

public void testParseAll()
                  throws IOException
Test parsing to a list.

Throws:
IOException - if the reader fails.

testOptionalConstructors

public void testOptionalConstructors()
                              throws IOException
Tests constructors with optional delimiters and optional quote char.

Throws:
IOException - if the reader fails.

parseQuotedStringWithDefinedSeperator

public void parseQuotedStringWithDefinedSeperator()
                                           throws IOException
Throws:
IOException

testSkippingLines

public void testSkippingLines()
                       throws IOException
Tests option to skip the first few lines of a file.

Throws:
IOException - if bad things happen

testSkippingLinesWithDifferentEscape

public void testSkippingLinesWithDifferentEscape()
                                          throws IOException
Tests option to skip the first few lines of a file.

Throws:
IOException - if bad things happen

testNormalParsedLine

public void testNormalParsedLine()
                          throws IOException
Test a normal non quoted line with three elements

Throws:
IOException

testASingleQuoteAsDataElement

public void testASingleQuoteAsDataElement()
                                   throws IOException
Same as testADoubleQuoteAsDataElement but I changed the quotechar to a single quote.

Throws:
IOException

testASingleQuoteAsDataElementWithEmptyField

public void testASingleQuoteAsDataElementWithEmptyField()
                                                 throws IOException
Same as testADoubleQuoteAsDataElement but I changed the quotechar to a single quote. Also the middle field is empty.

Throws:
IOException

testEscapedQuote

public void testEscapedQuote()
                      throws IOException
Throws:
IOException

testEscapedEscape

public void testEscapedEscape()
                       throws IOException
Throws:
IOException

testSingleQuoteWhenDoubleQuoteIsQuoteChar

public void testSingleQuoteWhenDoubleQuoteIsQuoteChar()
                                               throws IOException
Test a line where one of the elements is two single quotes and the quote character is the default double quote. The expected result is two single quotes.

Throws:
IOException

testQuotedParsedLine

public void testQuotedParsedLine()
                          throws IOException
Test a normal line with three elements and all elements are quoted

Throws:
IOException


Copyright © 2012. All Rights Reserved.