Exemplo n.º 1
0
 private void verifyChange(int cents, String expectedChange) {
   Change change = MakeChange.change(cents);
   assertEquals(expectedChange, change.toString());
 }
Exemplo n.º 2
0
 @Test
 public void testChangeFor1Cent() {
   Change change = MakeChange.change(1);
   assertEquals(1, change.getPennies());
 }
Exemplo n.º 3
0
 @Test
 public void testChangeFor5Cents() throws Exception {
   Change change = MakeChange.change(5);
   assertEquals(1, change.getNickles());
   assertEquals(0, change.getPennies());
 }