Skip to content

Commit

Permalink
Removing exeption message from test file
Browse files Browse the repository at this point in the history
  • Loading branch information
jagdish-15 committed Jan 16, 2025
1 parent ac51b0c commit 2e6d22c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private void checkIfImpossible(int desiredLiters, int bucketOneCap, int bucketTw
boolean invalidDivision = desiredLiters % gcd(bucketOneCap, bucketTwoCap) != 0;

if (exceedsCapacity || invalidDivision) {
throw new UnreachableGoalException("impossible");
throw new UnreachableGoalException();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ public void testBucketOneSizeTwoBucketTwoSizeThreeStartWithOne() {
public void testReachingGoalIsImpossible() {

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

}

Expand All @@ -104,8 +103,7 @@ public void testBucketOneSizeSixBucketTwoSizeFifteenStartWithOne() {
public void testGoalLargerThanBothBucketsIsImpossible() {

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

}
}

0 comments on commit 2e6d22c

Please sign in to comment.