Skip to content

Commit b00fe6e

Browse files
committed
feat: adds unit test for business account number to string
1 parent dda9341 commit b00fe6e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,11 @@ void testCloseBusinessAccount() {
8686
classUnderTest.closeAccount();
8787
assertTrue(classUnderTest.isClosed());
8888
}
89+
90+
@Test
91+
void testBusinessCheckingAccountToString() {
92+
String expected = "BusinessCheckingAccount{accountNumber='BIZ123456', balance=1000.0, isActive=true}";
93+
assertEquals(expected, classUnderTest.toString());
94+
}
8995

9096
}

0 commit comments

Comments
 (0)