org.springframework.batch.item
Class CommonItemReaderTests

java.lang.Object
  extended by TestCase
      extended by org.springframework.batch.item.CommonItemReaderTests
Direct Known Subclasses:
CommonItemStreamItemReaderTests

public abstract class CommonItemReaderTests
extends TestCase

Common tests for ItemReader implementations. Expected input is five Foo objects with values 1 to 5.


Field Summary
protected  ItemReader tested
           
 
Constructor Summary
CommonItemReaderTests()
           
 
Method Summary
protected abstract  ItemReader getItemReader()
           
protected  void setUp()
           
 void testRead()
          Regular scenario - read the input and eventually return null.
 void testReset()
          Rollback scenario - reader resets to last marked point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tested

protected ItemReader tested
Constructor Detail

CommonItemReaderTests

public CommonItemReaderTests()
Method Detail

getItemReader

protected abstract ItemReader getItemReader()
                                     throws Exception
Returns:
configured ItemReader ready for use.
Throws:
Exception

setUp

protected void setUp()
              throws Exception
Throws:
Exception

testRead

public void testRead()
              throws Exception
Regular scenario - read the input and eventually return null.

Throws:
Exception

testReset

public void testReset()
               throws Exception
Rollback scenario - reader resets to last marked point.

Throws:
Exception


Copyright © 2008 SpringSource. All Rights Reserved.