fix: fix code formatting

This commit is contained in:
Ilkka Seppälä
2025-04-14 20:54:05 +03:00
parent d95c6797a4
commit b8aa775d48
@@ -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");
}
}