Skip to content

Commit

Permalink
Added stream close snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
sunilgulabani committed Oct 11, 2016
1 parent 09b7c6e commit 5b09ae5
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public void givenFilePath_whenUsingFilesLines_thenFileData() throws IOException,
StringBuilder data = new StringBuilder();
Stream<String> lines = Files.lines(path);
lines.forEach(line -> data.append(line).append("\n"));
lines.close();

Assert.assertEquals(expectedData, data.toString().trim());
}
Expand Down

0 comments on commit 5b09ae5

Please sign in to comment.