Skip to content

Commit ae3310f

Browse files
fix/feat: constructor naming issue fixed in SavingAccount and test passed for despoit in SavingAccountTest
1 parent 4c98548 commit ae3310f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lesson_17/bank/bank_app/src/main/java/com/codedifferently/lesson17/bank/SavingAccount.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class SavingAccount implements Account {
2020
public SavingAccount(String accountNumber, Set<Customer> owners, double initialBalance) {
2121
this.accountNumber = accountNumber;
2222
this.owners = owners;
23-
this.balance = balance;
23+
this.balance = initialBalance;
2424
isActive = true;
2525
}
2626

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ void getOwners() {
3434
assertEquals(owners, classUnderTest.getOwners());
3535
}
3636

37-
// @Test
38-
// void deposit() {
39-
// classUnderTest.deposit(50.0);
40-
// assertEquals(150.0, classUnderTest.getBalance());
41-
// }
37+
@Test
38+
void deposit() {
39+
classUnderTest.deposit(50.0);
40+
assertEquals(150.0, classUnderTest.getBalance());
41+
}
4242

4343
// @Test
4444
// void deposit_withNegativeAmount() {

0 commit comments

Comments
 (0)