Skip to content

Commit 36fc786

Browse files
committed
test: adds FindAccountsByCustomerID_CustomerNotFound test to BankATMTest
1 parent 834ad43 commit 36fc786

File tree

1 file changed

+11
-0
lines changed
  • lesson_17/bank/bank_app/src/test/java/com/codedifferently/lesson17/bank

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,17 @@ void testDepositFunds_Check_AccountNotFound() {
8585
.withMessage("Account not found");
8686
}
8787

88+
@Test
89+
void testFindAccountsByCustomerId_CustomerNotFound() {
90+
UUID nonExistingCustomerId = UUID.randomUUID();
91+
92+
// Act
93+
Set<Account> accounts = classUnderTest.findAccountsByCustomerId(nonExistingCustomerId);
94+
95+
// Assert
96+
assertThat(accounts).isEmpty();
97+
}
98+
8899
@Test
89100
void testDepositFunds_Check() {
90101
// Arrange

0 commit comments

Comments
 (0)