Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jun 19, 2017
1 parent 5771bc8 commit 5da7bbd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/java/org/cactoos/io/ResourceAsInputTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package org.cactoos.io;

import java.io.IOException;
import java.util.Arrays;
import org.cactoos.text.BytesAsText;
import org.hamcrest.MatcherAssert;
Expand Down Expand Up @@ -93,4 +94,15 @@ public void readAbsentResourceTest() throws Exception {
);
}

@Test(expected = IOException.class)
public void throwsWhenResourceIsAbsent() throws Exception {
new BytesAsText(
new InputAsBytes(
new ResourceAsInput(
"bar/this-resource-is-definitely-absent.txt"
)
)
).asString();
}

}

0 comments on commit 5da7bbd

Please sign in to comment.