add tests
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package example;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class ExampleItemReaderTests extends TestCase {
|
||||
|
||||
private ExampleItemReader reader = new ExampleItemReader();
|
||||
|
||||
public void testReadOnce() throws Exception {
|
||||
assertEquals("Hello world!", reader.read());
|
||||
}
|
||||
|
||||
public void testReadTwice() throws Exception {
|
||||
reader.read();
|
||||
assertEquals(null, reader.read());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package example;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class ExampleItemWriterTests extends TestCase {
|
||||
|
||||
private ExampleItemWriter writer = new ExampleItemWriter();
|
||||
|
||||
public void testWrite() throws Exception {
|
||||
writer.write(null); // nothing bad happens
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user