|
|
@@ -91,6 +91,17 @@ public final class ChangeCalculatorTest {
|
|
91
|
91
|
|
|
92
|
92
|
@Ignore
|
|
93
|
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
|
+
|
|
|
103
|
+ @Ignore
|
|
|
104
|
+ @Test
|
|
94
|
105
|
public void testNegativeChangeIsRejected() {
|
|
95
|
106
|
ChangeCalculator changeCalculator = new ChangeCalculator(asList(1, 2, 5));
|
|
96
|
107
|
|