Skip to content

Commit

Permalink
Refactored test to always fallback to the specified fallback Input
Browse files Browse the repository at this point in the history
  • Loading branch information
driver733 committed Jan 28, 2018
1 parent 78950e6 commit c20e75e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/test/java/org/cactoos/io/InputWithFallbackTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
package org.cactoos.io;

import java.io.File;
import java.net.URI;
import java.io.IOException;
import org.cactoos.TextHasString;
import org.cactoos.text.TextOf;
import org.hamcrest.MatcherAssert;
Expand Down Expand Up @@ -63,11 +63,9 @@ public void readsAlternativeInputUri() {
"Can't read alternative source from URI",
new TextOf(
new InputWithFallback(
new StickyInput(
new InputOf(
URI.create("http://www.cactoos.org/path-is-absent")
)
),
() -> {
throw new IOException("Always fails!");
},
new InputOf("it works!")
)
),
Expand Down

0 comments on commit c20e75e

Please sign in to comment.