Skip to content

Commit b8aa775

Browse files
committed
fix: fix code formatting
1 parent d95c679 commit b8aa775

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

Diff for: money/src/test/java/com/iluwater/money/MoneyTest.java

+6-17
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ void testAddMoney_DifferentCurrency() {
5959
Money money1 = new Money(100.00, "USD");
6060
Money money2 = new Money(50.25, "EUR");
6161

62-
assertThrows(
63-
CannotAddTwoCurrienciesException.class,
64-
() -> money1.addMoney(money2));
62+
assertThrows(CannotAddTwoCurrienciesException.class, () -> money1.addMoney(money2));
6563
}
6664

6765
@Test
@@ -81,9 +79,7 @@ void testSubtractMoney_DifferentCurrency() {
8179
Money money1 = new Money(100.00, "USD");
8280
Money money2 = new Money(50.25, "EUR");
8381

84-
assertThrows(
85-
CannotSubtractException.class,
86-
() -> money1.subtractMoney(money2));
82+
assertThrows(CannotSubtractException.class, () -> money1.subtractMoney(money2));
8783
}
8884

8985
@Test
@@ -92,9 +88,7 @@ void testSubtractMoney_AmountTooLarge() {
9288
Money money1 = new Money(50.00, "USD");
9389
Money money2 = new Money(60.00, "USD");
9490

95-
assertThrows(
96-
CannotSubtractException.class,
97-
() -> money1.subtractMoney(money2));
91+
assertThrows(CannotSubtractException.class, () -> money1.subtractMoney(money2));
9892
}
9993

10094
@Test
@@ -112,9 +106,7 @@ void testMultiply_NegativeFactor() {
112106
// Test multiplying by a negative factor
113107
Money money = new Money(100.00, "USD");
114108

115-
assertThrows(
116-
IllegalArgumentException.class,
117-
() -> money.multiply(-2));
109+
assertThrows(IllegalArgumentException.class, () -> money.multiply(-2));
118110
}
119111

120112
@Test
@@ -133,15 +125,12 @@ void testExchangeCurrency_NegativeExchangeRate() {
133125
// Test converting currency with a negative exchange rate
134126
Money money = new Money(100.00, "USD");
135127

136-
assertThrows(
137-
IllegalArgumentException.class,
138-
() -> money.exchangeCurrency("EUR", -0.85));
128+
assertThrows(IllegalArgumentException.class, () -> money.exchangeCurrency("EUR", -0.85));
139129
}
140130

141131
@Test
142132
void testAppExecution() {
143133
assertDoesNotThrow(
144-
() -> App.main(new String[] {}),
145-
"App execution should not throw any exceptions");
134+
() -> App.main(new String[] {}), "App execution should not throw any exceptions");
146135
}
147136
}

0 commit comments

Comments
 (0)