Skip to content

Commit cd608b6

Browse files
committed
change: update to include new canonical test
1 parent b473c4e commit cd608b6

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎exercises/change/src/test/java/ChangeCalculatorTest.java‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,17 @@ public void testChangeLessThanSmallestCoinInCurrencyCannotBeRepresented() {
8989
changeCalculator.computeMostEfficientChange(3);
9090
}
9191

92+
@Ignore
93+
@Test
94+
public void testChangeLargerThanAllCoinsInCurrencyThatCannotBeRepresented() {
95+
ChangeCalculator changeCalculator = new ChangeCalculator(asList(5, 10));
96+
97+
expectedException.expect(IllegalArgumentException.class);
98+
expectedException.expectMessage("The total 94 cannot be represented in the given currency.");
99+
100+
changeCalculator.computeMostEfficientChange(94);
101+
}
102+
92103
@Ignore
93104
@Test
94105
public void testNegativeChangeIsRejected() {

0 commit comments

Comments
 (0)