Skip to content

Commit

Permalink
Improve coverage for Issue #80 (#91)
Browse files Browse the repository at this point in the history
* Improve coverage for Issue #80

* Minor additions to improve coverage slightly.  Still unable to test for empty .arc.gz.
  • Loading branch information
greebie authored and ruebot committed Oct 13, 2017
1 parent f28c6e1 commit 23d0cb4
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -42,7 +42,8 @@ public final void testInputFormat() throws Exception {
"dns:www.archive.org",
"http://www.archive.org/robots.txt",
"http://www.archive.org/",
"http://www.archive.org/index.php" };
"http://www.archive.org/index.php"
};

String arcFile = Resources.getResource("arc/example.arc.gz").getPath();

Expand All @@ -64,16 +65,17 @@ public final void testInputFormat() throws Exception {

int cnt = 0;
final int cntTest = 300;

float getProg = reader.getProgress();
assertEquals(getProg, 0.0f, 0);
while (reader.nextKeyValue()) {
ARCRecord record = reader.getCurrentValue().getRecord();
ARCRecordMetaData metadata = record.getMetaData();

if (cnt < urls.length) {
assertEquals(urls[cnt], metadata.getUrl());
}
cnt++;
}
assertEquals(cntTest, cnt);
assertEquals(reader.getProgress(), 0.0f, 0);
}
}

0 comments on commit 23d0cb4

Please sign in to comment.