com.ricebridge.csvman.test
Class CsvManagerTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bycom.ricebridge.csvman.test.CsvManagerTest
All Implemented Interfaces:
junit.framework.Test

public class CsvManagerTest
extends junit.framework.TestCase

Test cases for CsvManager.

The Source Code of this Java class is available under a BSD-style license.


Nested Class Summary
static class CsvManagerTest.TestFieldListener
          Text FieldListener
 
Constructor Summary
CsvManagerTest(String pName)
           
 
Method Summary
static void main(String[] pArgs)
           
static LineProvider makeTestLineProvider()
          An example of a very simple LineProvider.
static junit.framework.TestSuite suite()
           
 void testBadLines()
           
 void testEmptyLines()
           
 void testEscapeMap()
           
 void testFieldListener()
           
 void testLineProvider()
           
 void testLoadSave()
           
 void testNoData()
           
 void testQuotes()
           
 void testSeparator()
           
 void testStartEndLineLoad()
           
 void testStartEndLineSave()
           
 void testTrim()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CsvManagerTest

public CsvManagerTest(String pName)
Method Detail

suite

public static junit.framework.TestSuite suite()

main

public static void main(String[] pArgs)

makeTestLineProvider

public static LineProvider makeTestLineProvider()
An example of a very simple LineProvider. Note that the LineProvider.hasNextLine() method is called before the LineProvider.nextLine() method. This means that you should be take care initialise any array index variables to -1, so that they will be 0 after the first call to nextLine. This also means that the test in hasNextLine should be against the next (+1), not the current, value of the row index.

See the Source Code of this method for the full example.


testLineProvider

public void testLineProvider()
                      throws Exception
Throws:
Exception

testSeparator

public void testSeparator()
                   throws Exception
Throws:
Exception

testQuotes

public void testQuotes()
                throws Exception
Throws:
Exception

testTrim

public void testTrim()
              throws Exception
Throws:
Exception

testBadLines

public void testBadLines()
                  throws Exception
Throws:
Exception

testEmptyLines

public void testEmptyLines()
                    throws Exception
Throws:
Exception

testStartEndLineLoad

public void testStartEndLineLoad()
                          throws Exception
Throws:
Exception

testStartEndLineSave

public void testStartEndLineSave()
                          throws Exception
Throws:
Exception

testEscapeMap

public void testEscapeMap()
                   throws Exception
Throws:
Exception

testLoadSave

public void testLoadSave()
                  throws Exception
Throws:
Exception

testFieldListener

public void testFieldListener()
                       throws Exception
Throws:
Exception

testNoData

public void testNoData()


Copyright © 2003-2006 Ricebridge