org.springframework.batch.item.file
Class FlatFileItemReaderAdvancedTests

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.springframework.batch.item.file.FlatFileItemReaderAdvancedTests
All Implemented Interfaces:
junit.framework.Test

public class FlatFileItemReaderAdvancedTests
extends junit.framework.TestCase

Tests for FlatFileItemReader - skip and restart functionality.

See Also:
FlatFileItemReaderBasicTests

Constructor Summary
FlatFileItemReaderAdvancedTests()
           
 
Method Summary
protected  void setUp()
          Create inputFile, inject mock/stub dependencies for tested object, initialize the tested object
protected  void tearDown()
          Release resources and delete the temporary file
 void testFailOnFirstChunk()
          Test skip and skipRollback functionality
 void testReset()
          Test rollback functionality
 void testRestart()
           
 void testRestartWithCustomRecordSeparatorPolicy()
           
 void testRestartWithHeader()
           
 void testRestartWithSkippedLines()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FlatFileItemReaderAdvancedTests

public FlatFileItemReaderAdvancedTests()
Method Detail

setUp

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

Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Release resources and delete the temporary file

Overrides:
tearDown in class junit.framework.TestCase
Throws:
Exception

testReset

public void testReset()
               throws Exception
Test rollback functionality

Throws:
IOException
Exception

testFailOnFirstChunk

public void testFailOnFirstChunk()
                          throws Exception
Test skip and skipRollback functionality

Throws:
IOException
Exception

testRestart

public void testRestart()
                 throws Exception
Throws:
Exception

testRestartWithCustomRecordSeparatorPolicy

public void testRestartWithCustomRecordSeparatorPolicy()
                                                throws Exception
Throws:
Exception

testRestartWithHeader

public void testRestartWithHeader()
                           throws Exception
Throws:
Exception

testRestartWithSkippedLines

public void testRestartWithSkippedLines()
                                 throws Exception
Throws:
Exception


Copyright © 2008 SpringSource. All Rights Reserved.