Skip to content

Commit a424e76

Browse files
feat: add exception to test. Inital commit for AuditLog
1 parent 0fc4226 commit a424e76

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.codedifferently.lesson17.bank;
2+
3+
public class AuditLog {
4+
5+
}

lesson_17/bank/bank_app/src/test/java/com/codedifferently/lesson17/bank/BankAtmTest.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
import com.codedifferently.lesson17.bank.exceptions.AccountNotFoundException;
77
import com.codedifferently.lesson17.bank.exceptions.CheckVoidedException;
8+
import com.codedifferently.lesson17.bank.exceptions.UnsupportedCurrencyException;
9+
810
import java.util.Set;
911
import java.util.UUID;
1012
import org.junit.jupiter.api.BeforeEach;
@@ -59,7 +61,12 @@ void testFindAccountsByCustomerId() {
5961
@Test
6062
void testDepositFunds() {
6163
// Act
62-
classUnderTest.depositFunds(account1.getAccountNumber(), 50.0);
64+
try {
65+
classUnderTest.depositFunds(account1.getAccountNumber(), 50.0, "USD");
66+
} catch (UnsupportedCurrencyException e) {
67+
// TODO Auto-generated catch block
68+
e.printStackTrace();
69+
}
6370

6471
// Assert
6572
assertThat(account1.getBalance()).isEqualTo(150.0);

0 commit comments

Comments
 (0)