diff --git a/src/main/java/org/thoughtworks/linesh/multicurrencymoney/Money.java b/src/main/java/org/thoughtworks/linesh/multicurrencymoney/Money.java index 1ccf75e..4d32953 100644 --- a/src/main/java/org/thoughtworks/linesh/multicurrencymoney/Money.java +++ b/src/main/java/org/thoughtworks/linesh/multicurrencymoney/Money.java @@ -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 diff --git a/src/test/java/org/thoughtworks/linesh/multicurrencymoney/FranceTest.java b/src/test/java/org/thoughtworks/linesh/multicurrencymoney/FranceTest.java index 4548422..9030cd9 100644 --- a/src/test/java/org/thoughtworks/linesh/multicurrencymoney/FranceTest.java +++ b/src/test/java/org/thoughtworks/linesh/multicurrencymoney/FranceTest.java @@ -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))); - } - } } }