Skip to content

Commit

Permalink
#759: Implement ScalarWithFallback - add another test case
Browse files Browse the repository at this point in the history
  • Loading branch information
proshin-roman committed May 4, 2018
1 parent c7bf527 commit 569b88d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/java/org/cactoos/scalar/ScalarWithFallbackTest.java
Expand Up @@ -143,4 +143,15 @@ public void usesTheClosestFallback() throws Exception {
new ScalarHasValue<>(expected)
);
}

@Test(expected = Exception.class)
public void noFallbackIsProvided() throws Exception {
new ScalarWithFallback<>(
() -> {
throw new IllegalFormatWidthException(1);
},
new IterableOf<>(),
input -> input
).value();
}
}

0 comments on commit 569b88d

Please sign in to comment.