Skip to content

Commit

Permalink
Added a test for App.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmed-Taha-981 committed Dec 9, 2024
1 parent d8d07a4 commit 6119a0e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions money/src/test/java/com/iluwater/money/MoneyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.iluwatar.CannotAddTwoCurrienciesException;
import com.iluwatar.CannotSubtractException;
import com.iluwatar.Money;
import com.iluwatar.App;


class MoneyTest {
Expand Down Expand Up @@ -112,4 +113,13 @@ void testExchangeCurrency_NegativeExchangeRate() {
money.exchangeCurrency("EUR", -0.85);
});
}


@Test
void testAppExecution() {
assertDoesNotThrow(() -> {
App.main(new String[]{});
}, "App execution should not throw any exceptions");
}

}

0 comments on commit 6119a0e

Please sign in to comment.