fix: fix code formatting

This commit is contained in:
Ilkka Seppälä committed 2025-04-14 20:54:05 +03:00
1 parent d95c6797a4
commit b8aa775d48
1 file changed
+6 -17
@@ -59,9 +59,7 @@ class MoneyTest {
Money money1 = new Money(100.00, "USD"); Money money1 = new Money(100.00, "USD");
Money money2 = new Money(50.25, "EUR"); Money money2 = new Money(50.25, "EUR");
assertThrows( assertThrows(CannotAddTwoCurrienciesException.class, () -> money1.addMoney(money2));
CannotAddTwoCurrienciesException.class,
() -> money1.addMoney(money2));
} }
@Test @Test
@@ -81,9 +79,7 @@ class MoneyTest {
Money money1 = new Money(100.00, "USD"); Money money1 = new Money(100.00, "USD");
Money money2 = new Money(50.25, "EUR"); Money money2 = new Money(50.25, "EUR");
assertThrows( assertThrows(CannotSubtractException.class, () -> money1.subtractMoney(money2));
CannotSubtractException.class,
() -> money1.subtractMoney(money2));
} }
@Test @Test
@@ -92,9 +88,7 @@ class MoneyTest {
Money money1 = new Money(50.00, "USD"); Money money1 = new Money(50.00, "USD");
Money money2 = new Money(60.00, "USD"); Money money2 = new Money(60.00, "USD");
assertThrows( assertThrows(CannotSubtractException.class, () -> money1.subtractMoney(money2));
CannotSubtractException.class,
() -> money1.subtractMoney(money2));
} }
@Test @Test
@@ -112,9 +106,7 @@ class MoneyTest {
// Test multiplying by a negative factor // Test multiplying by a negative factor
Money money = new Money(100.00, "USD"); Money money = new Money(100.00, "USD");
assertThrows( assertThrows(IllegalArgumentException.class, () -> money.multiply(-2));
IllegalArgumentException.class,
() -> money.multiply(-2));
} }
@Test @Test
@@ -133,15 +125,12 @@ class MoneyTest {
// Test converting currency with a negative exchange rate // Test converting currency with a negative exchange rate
Money money = new Money(100.00, "USD"); Money money = new Money(100.00, "USD");
assertThrows( assertThrows(IllegalArgumentException.class, () -> money.exchangeCurrency("EUR", -0.85));
IllegalArgumentException.class,
() -> money.exchangeCurrency("EUR", -0.85));
} }
@Test @Test
void testAppExecution() { void testAppExecution() {
assertDoesNotThrow( assertDoesNotThrow(
() -> App.main(new String[] {}), () -> App.main(new String[] {}), "App execution should not throw any exceptions");
"App execution should not throw any exceptions");
} }
} }