Skip to content

Commit 2e6d22c

Browse files
committed
Removing exeption message from test file
1 parent ac51b0c commit 2e6d22c

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

exercises/practice/two-bucket/.meta/src/reference/java/TwoBucket.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private void checkIfImpossible(int desiredLiters, int bucketOneCap, int bucketTw
105105
boolean invalidDivision = desiredLiters % gcd(bucketOneCap, bucketTwoCap) != 0;
106106

107107
if (exceedsCapacity || invalidDivision) {
108-
throw new UnreachableGoalException("impossible");
108+
throw new UnreachableGoalException();
109109
}
110110
}
111111

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

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

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

8887
}
8988

@@ -104,8 +103,7 @@ public void testBucketOneSizeSixBucketTwoSizeFifteenStartWithOne() {
104103
public void testGoalLargerThanBothBucketsIsImpossible() {
105104

106105
assertThatExceptionOfType(UnreachableGoalException.class)
107-
.isThrownBy(() -> new TwoBucket(5, 7, 8, "one").getResult())
108-
.withMessage("impossible");
106+
.isThrownBy(() -> new TwoBucket(5, 7, 8, "one").getResult());
109107

110108
}
111109
}

0 commit comments

Comments
 (0)