Skip to content

Commit 81210a0

Browse files
committed
Chaning asseration to call getResult for impossible bucket
1 parent 9935ee5 commit 81210a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/practice/two-bucket/src/test/java/TwoBucketTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void testBucketOneSizeTwoBucketTwoSizeThreeStartWithOne() {
8282
public void testReachingGoalIsImpossible() {
8383

8484
assertThatExceptionOfType(UnreachableGoalException.class)
85-
.isThrownBy(() -> new TwoBucket(6, 15, 5, "one"))
85+
.isThrownBy(() -> new TwoBucket(6, 15, 5, "one").getResult())
8686
.withMessage("impossible");
8787

8888
}
@@ -104,7 +104,7 @@ public void testBucketOneSizeSixBucketTwoSizeFifteenStartWithOne() {
104104
public void testGoalLargerThanBothBucketsIsImpossible() {
105105

106106
assertThatExceptionOfType(UnreachableGoalException.class)
107-
.isThrownBy(() -> new TwoBucket(5, 7, 8, "one"))
107+
.isThrownBy(() -> new TwoBucket(5, 7, 8, "one").getResult())
108108
.withMessage("impossible");
109109

110110
}

0 commit comments

Comments
 (0)