RESOLVED - BATCH-414: consistent handling of empty input by ItemReaders

renamed listener + reused NoWorkFoundException
This commit is contained in:
robokaso
2008-06-30 08:16:52 +00:00
parent b95f14075e
commit a35ad43fe7
3 changed files with 9 additions and 12 deletions

View File

@@ -20,10 +20,11 @@ import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobInstance;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.item.NoWorkFoundException;
public class NoItemsProcessedDetectorTests extends TestCase {
public class NoWorkFoundListenerTests extends TestCase {
private NoItemsProcessedDetector tested = new NoItemsProcessedDetector();
private NoWorkFoundListener tested = new NoWorkFoundListener();
/**
* If item count is zero exception is thrown
@@ -38,7 +39,7 @@ public class NoItemsProcessedDetectorTests extends TestCase {
try {
tested.afterStep(stepExecution);
fail();
} catch (RuntimeException e) {
} catch (NoWorkFoundException e) {
assertEquals("Step has not processed any items", e.getMessage());
}
}