Updated file test
Some checks failed
Locusworks Team/commons/pipeline/head There was a failure building this commit
Some checks failed
Locusworks Team/commons/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -49,12 +49,14 @@ public class FileReaderTest {
|
||||
@Test
|
||||
public void testForLoop() {
|
||||
Integer lineCount = 0;
|
||||
for(LineInfo s : new FileReader(Paths.get(TEST_FILE))) {
|
||||
lineCount++;
|
||||
Integer lineNumber = s.getLineNumber();
|
||||
Integer lineLength = s.getLine().length();
|
||||
Integer mapLineLength = numLines.get(lineNumber);
|
||||
assertTrue(lineLength == (mapLineLength-1));
|
||||
try (FileReader fr = new FileReader(Paths.get(TEST_FILE))) {
|
||||
for (LineInfo s : fr) {
|
||||
lineCount++;
|
||||
Integer lineNumber = s.getLineNumber();
|
||||
Integer lineLength = s.getLine().length();
|
||||
Integer mapLineLength = numLines.get(lineNumber);
|
||||
assertTrue(lineLength == (mapLineLength-1));
|
||||
}
|
||||
}
|
||||
assertTrue(lineCount == numLines.size());
|
||||
}
|
||||
|
Reference in New Issue
Block a user