org.springframework.batch.item.file
Class FlatFileItemReaderBasicTests

java.lang.Object
  extended by TestCase
      extended by org.springframework.batch.item.file.FlatFileItemReaderBasicTests

public class FlatFileItemReaderBasicTests
extends TestCase

Tests for FlatFileItemReader - the fundamental item reading functionality.

Author:
Dave Syer
See Also:
FlatFileItemReaderAdvancedTests

Constructor Summary
FlatFileItemReaderBasicTests()
           
 
Method Summary
protected  void setUp()
          Create inputFile, inject mock/stub dependencies for tested object, initialize the tested object
protected  void tearDown()
          Release resources.
 void testCloseBeforeOpen()
           
 void testColumnNamesInHeader()
          Header line is skipped and used to setup fieldSet column names.
 void testComments()
           
 void testEncoding()
           
 void testInitializationWithNullResource()
           
 void testLinesToSkip()
          Header line is skipped and used to setup fieldSet column names.
 void testNonExistantResource()
           
 void testOpenTwiceHasNoEffect()
           
 void testRead()
          Regular usage of read method
 void testReadBeforeOpen()
           
 void testReadExhausted()
          Regular usage of read method
 void testReadWithMapperError()
           
 void testReadWithTokenizerError()
          Regular usage of read method
 void testRecordSeparator()
           
 void testRuntimeFileCreation()
           
 void testSetInvalidEncoding()
           
 void testSetNullEncoding()
           
 void testSetValidEncoding()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlatFileItemReaderBasicTests

public FlatFileItemReaderBasicTests()
Method Detail

setUp

protected void setUp()
              throws Exception
Create inputFile, inject mock/stub dependencies for tested object, initialize the tested object

Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Release resources.

Throws:
Exception

testRead

public void testRead()
              throws Exception
Regular usage of read method

Throws:
Exception

testReadExhausted

public void testReadExhausted()
                       throws Exception
Regular usage of read method

Throws:
Exception

testReadWithTokenizerError

public void testReadWithTokenizerError()
                                throws Exception
Regular usage of read method

Throws:
Exception

testReadWithMapperError

public void testReadWithMapperError()
                             throws Exception
Throws:
Exception

testReadBeforeOpen

public void testReadBeforeOpen()
                        throws Exception
Throws:
Exception

testCloseBeforeOpen

public void testCloseBeforeOpen()
                         throws Exception
Throws:
Exception

testInitializationWithNullResource

public void testInitializationWithNullResource()
                                        throws Exception
Throws:
Exception

testOpenTwiceHasNoEffect

public void testOpenTwiceHasNoEffect()
                              throws Exception
Throws:
Exception

testSetValidEncoding

public void testSetValidEncoding()
                          throws Exception
Throws:
Exception

testSetNullEncoding

public void testSetNullEncoding()
                         throws Exception
Throws:
Exception

testSetInvalidEncoding

public void testSetInvalidEncoding()
                            throws Exception
Throws:
Exception

testEncoding

public void testEncoding()
                  throws Exception
Throws:
Exception

testRecordSeparator

public void testRecordSeparator()
                         throws Exception
Throws:
Exception

testComments

public void testComments()
                  throws Exception
Throws:
Exception

testColumnNamesInHeader

public void testColumnNamesInHeader()
                             throws Exception
Header line is skipped and used to setup fieldSet column names.

Throws:
Exception

testLinesToSkip

public void testLinesToSkip()
                     throws Exception
Header line is skipped and used to setup fieldSet column names.

Throws:
Exception

testNonExistantResource

public void testNonExistantResource()
                             throws Exception
Throws:
Exception

testRuntimeFileCreation

public void testRuntimeFileCreation()
                             throws Exception
Throws:
Exception


Copyright © 2008 SpringSource. All Rights Reserved.