From b8aa775d488e7297831c91ce74c411ef817ee39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?= Date: Mon, 14 Apr 2025 20:54:05 +0300 Subject: [PATCH] fix: fix code formatting --- .../java/com/iluwater/money/MoneyTest.java | 23 +++++-------------- 1 file changed, 6 insertions(+), 17 deletions(-) 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"); } }