diff --git a/money/src/test/java/com/iluwater/money/MoneyTest.java b/money/src/test/java/com/iluwater/money/MoneyTest.java index c090bbb0e..6ee01283f 100644 --- a/money/src/test/java/com/iluwater/money/MoneyTest.java +++ b/money/src/test/java/com/iluwater/money/MoneyTest.java @@ -59,9 +59,7 @@ class MoneyTest { Money money1 = new Money(100.00, "USD"); Money money2 = new Money(50.25, "EUR"); - assertThrows( - CannotAddTwoCurrienciesException.class, - () -> money1.addMoney(money2)); + assertThrows(CannotAddTwoCurrienciesException.class, () -> money1.addMoney(money2)); } @Test @@ -81,9 +79,7 @@ class MoneyTest { Money money1 = new Money(100.00, "USD"); Money money2 = new Money(50.25, "EUR"); - assertThrows( - CannotSubtractException.class, - () -> money1.subtractMoney(money2)); + assertThrows(CannotSubtractException.class, () -> money1.subtractMoney(money2)); } @Test @@ -92,9 +88,7 @@ class MoneyTest { Money money1 = new Money(50.00, "USD"); Money money2 = new Money(60.00, "USD"); - assertThrows( - CannotSubtractException.class, - () -> money1.subtractMoney(money2)); + assertThrows(CannotSubtractException.class, () -> money1.subtractMoney(money2)); } @Test @@ -112,9 +106,7 @@ class MoneyTest { // Test multiplying by a negative factor Money money = new Money(100.00, "USD"); - assertThrows( - IllegalArgumentException.class, - () -> money.multiply(-2)); + assertThrows(IllegalArgumentException.class, () -> money.multiply(-2)); } @Test @@ -133,15 +125,12 @@ class MoneyTest { // Test converting currency with a negative exchange rate Money money = new Money(100.00, "USD"); - assertThrows( - IllegalArgumentException.class, - () -> money.exchangeCurrency("EUR", -0.85)); + assertThrows(IllegalArgumentException.class, () -> money.exchangeCurrency("EUR", -0.85)); } @Test void testAppExecution() { assertDoesNotThrow( - () -> App.main(new String[] {}), - "App execution should not throw any exceptions"); + () -> App.main(new String[] {}), "App execution should not throw any exceptions"); } }