add tests

This commit is contained in:
dsyer
2008-06-23 11:33:00 +00:00
parent 9f4ead72be
commit f328615102
2 changed files with 31 additions and 0 deletions

View File

@@ -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());
}
}

View File

@@ -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
}
}