Leon Hunter 5 anni fa
parent
commit
f7b432d371

+ 3
- 3
src/test/java/rocks/zipcode/quiz3a/objectorientation/bankaccount/DepositTest.java Vedi File

28
         test(10.0, 50.0);
28
         test(10.0, 50.0);
29
     }
29
     }
30
 
30
 
31
-    public void test(Double initialBalance, Double withdrawalAmount) {
31
+    public void test(Double initialBalance, Double witdrawalAmount) {
32
         // given
32
         // given
33
-        Double expected = initialBalance + withdrawalAmount;
33
+        Double expected = initialBalance + witdrawalAmount;
34
         BankAccount bankAccount = new BankAccount();
34
         BankAccount bankAccount = new BankAccount();
35
         bankAccount.setBalance(initialBalance);
35
         bankAccount.setBalance(initialBalance);
36
 
36
 
37
         // when
37
         // when
38
-        bankAccount.withdrawal(withdrawalAmount);
38
+        bankAccount.deposit(witdrawalAmount);
39
         Double actual = bankAccount.getBalance();
39
         Double actual = bankAccount.getBalance();
40
 
40
 
41
         // then
41
         // then