org.springframework.batch.item
Class CommonItemReaderTests
java.lang.Object
TestCase
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.
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 |
tested
protected ItemReader tested
CommonItemReaderTests
public CommonItemReaderTests()
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.