Skip to content

Commit d306393

Browse files
author
AmiyahJo
committed
feat: adds testGetBusinessName
1 parent 9746c24 commit d306393

File tree

1 file changed

+4
-13
lines changed
  • lesson_17/bank/bank_app/src/test/java/com/codedifferently/lesson17/bank

1 file changed

+4
-13
lines changed

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

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -123,23 +123,14 @@ void testAddBusinessCheckingAccountWithoutBusinessAccount() {
123123
}
124124

125125
@Test
126-
void testAddBusinessCheckingAccountWithBusinessAccount() {
126+
void testGetBusinessName() {
127127
// Arrange
128128
Customer businessOwner = new Customer(UUID.randomUUID(), "Business Owner");
129129
Set<Customer> owners = Set.of(businessOwner);
130+
BusinessCheckingAccount businessAccount = new BusinessCheckingAccount("123456789", owners, "Business Inc.", 1000.0);
130131

131-
BusinessCheckingAccount existingBusinessAccount = new BusinessCheckingAccount("123456789", owners, "Existing Business", 1000.0);
132-
classUnderTest.addAccount(existingBusinessAccount);
133-
134-
135-
BusinessCheckingAccount newBusinessAccount = new BusinessCheckingAccount("789456123", owners, "New Business", 1000.0);
136-
137-
// Act
138-
classUnderTest.addAccount(newBusinessAccount);
139-
140-
// Assert
141-
Set<CheckingAccount> accounts = classUnderTest.findAccountsByCustomerId(businessOwner.getId());
142-
assertThat(accounts).contains(existingBusinessAccount, newBusinessAccount);
132+
//Act & Assert
133+
assertThat(businessAccount.getBusinessName());
143134
}
144135

145136
}

0 commit comments

Comments
 (0)