Skip to content

Commit

Permalink
(yegor256#1239) Add extra tests for HeadOf
Browse files Browse the repository at this point in the history
  • Loading branch information
victornoel committed Feb 5, 2020
1 parent 8bbef90 commit b54cae4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/java/org/cactoos/io/HeadOfTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@ public void readsHeadOfLongerInput() throws Exception {
).affirm();
}

@Test
public void readsEmptyHeadOfInput() throws Exception {
new Assertion<>(
"must limit to 0 the number of read bytes",
new TextOf(
new HeadOf(
new InputOf("readsEmptyHeadOfInput"),
0
)
),
new TextHasString("")
).affirm();
}

@Test
public void readsHeadOfShorterInput() throws Exception {
final String input = "readsHeadOfShorterInput";
Expand Down

0 comments on commit b54cae4

Please sign in to comment.