コード例 #1
0
 @Test
 public void testHasNextRecordForEmptyFile() throws Exception {
   flatFileRecordReader.close();
   flatFileRecordReader = new FlatFileRecordReader(emptyDataSource);
   flatFileRecordReader.open();
   assertThat(flatFileRecordReader.hasNextRecord()).isFalse();
 }
コード例 #2
0
 @After
 public void tearDown() throws Exception {
   flatFileRecordReader.close();
 }
コード例 #3
0
 @Test
 public void testTotalRecordsForNonExistingFile() throws Exception {
   flatFileRecordReader.close();
   flatFileRecordReader = new FlatFileRecordReader(nonExistingDataSource);
   assertThat(flatFileRecordReader.getTotalRecords()).isNull();
 }
コード例 #4
0
 @Test
 public void testTotalRecordsForEmptyFile() throws Exception {
   flatFileRecordReader.close();
   flatFileRecordReader = new FlatFileRecordReader(emptyDataSource);
   assertThat(flatFileRecordReader.getTotalRecords()).isEqualTo(0l);
 }