|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.springframework.batch.item.CommonItemReaderTests
public abstract class CommonItemReaderTests
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 abstract void |
pointToEmptyInput(ItemReader tested)
Point the reader to empty input (close and open if necessary for the new settings to apply). |
protected void |
setUp()
|
void |
testEmptyInput()
Empty input should be handled gracefully - null is returned on first read. |
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 junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ItemReader tested
Constructor Detail |
---|
public CommonItemReaderTests()
Method Detail |
---|
protected abstract ItemReader getItemReader() throws Exception
Exception
protected void setUp() throws Exception
setUp
in class junit.framework.TestCase
Exception
public void testRead() throws Exception
Exception
public void testReset() throws Exception
Exception
public void testEmptyInput() throws Exception
Exception
protected abstract void pointToEmptyInput(ItemReader tested) throws Exception
tested
- the reader
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |