Skip to content

Commit

Permalink
[#3] Refactor, remove reference to Dollar&France and remove duplicate…
Browse files Browse the repository at this point in the history
…d tests
  • Loading branch information
EthanLin-TWer committed Jan 14, 2017
1 parent 3e76556 commit 395503e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ public int getAmount() {
}

public static Money dollar(int amount) {
return new Dollar(amount, "USD");
return new Money(amount, "USD");
}

public static Money france(int amount) {
return new France(amount, "CHF");
return new Money(amount, "CHF");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,5 @@ void should_test_france_multiplications() {
assertEquals(Money.france(10), five.times(2));
assertEquals(Money.france(15), five.times(3));
}

@Tasking @Nested
class should_test_equality {
@Test
void should_test_france_equality() {
assertTrue(Money.france(5).equals(Money.france(5)));
assertFalse(Money.france(5).equals(Money.france(6)));
}
}
}
}

0 comments on commit 395503e

Please sign in to comment.