Leon 5 years ago
parent
commit
b9baa214e7

+ 1
- 1
src/test/java/rocks/zipcode/quiz5/fundamentals/calculator/AddTest.java View File

11
     @Test
11
     @Test
12
     public void test1() {
12
     public void test1() {
13
         // given
13
         // given
14
-        test(98.5, 10.5, 88.5);
14
+        test(99.0, 10.5, 88.5);
15
     }
15
     }
16
 
16
 
17
     @Test
17
     @Test

+ 6
- 6
src/test/java/rocks/zipcode/quiz5/objectorientation/bankaccount/DepositPositiveTest.java View File

17
 
17
 
18
     @Test(expected = IllegalArgumentException.class)
18
     @Test(expected = IllegalArgumentException.class)
19
     public void test2() {
19
     public void test2() {
20
-        test(10.0, 50.0);
20
+        test(10.0, -50.0);
21
     }
21
     }
22
 
22
 
23
     @Test(expected = IllegalArgumentException.class)
23
     @Test(expected = IllegalArgumentException.class)
24
     public void test3() {
24
     public void test3() {
25
-        test(55.0, 500.0);
25
+        test(55.0, -500.0);
26
     }
26
     }
27
 
27
 
28
     @Test(expected = IllegalArgumentException.class)
28
     @Test(expected = IllegalArgumentException.class)
29
     public void test4() {
29
     public void test4() {
30
-        test(78.0, 90.0);
30
+        test(78.0, -90.0);
31
     }
31
     }
32
 
32
 
33
-    public void test(Double initialBalance, Double witdrawalAmount) {
33
+    public void test(Double initialBalance, Double depositAmount) {
34
         // given
34
         // given
35
-        Double expected = initialBalance + witdrawalAmount;
35
+        Double expected = initialBalance + depositAmount;
36
         BankAccount bankAccount = new BankAccount();
36
         BankAccount bankAccount = new BankAccount();
37
         Transactable transactable = (Transactable)bankAccount;
37
         Transactable transactable = (Transactable)bankAccount;
38
         bankAccount.setBalance(initialBalance);
38
         bankAccount.setBalance(initialBalance);
39
 
39
 
40
         // when
40
         // when
41
-        transactable.deposit(witdrawalAmount);
41
+        transactable.deposit(depositAmount);
42
         Double actual = transactable.getBalance();
42
         Double actual = transactable.getBalance();
43
 
43
 
44
         // then
44
         // then