Преглед изворни кода

Merge branch 'master' of https://git.zipcode.rocks/Cohort4.2/Quiz5

curtiscook пре 5 година
родитељ
комит
373c19d722

+ 1
- 1
src/test/java/rocks/zipcode/quiz5/fundamentals/calculator/AddTest.java Прегледај датотеку

@@ -44,6 +44,6 @@ public class AddTest {
44 44
         Double actual = calculator.add(input1, input2);
45 45
 
46 46
         // then
47
-        Assert.assertEquals(expected, actual, 0);
47
+        Assert.assertEquals(expected, actual, 0.01);
48 48
     }
49 49
 }

+ 2
- 2
src/test/java/rocks/zipcode/quiz5/fundamentals/calculator/DivideTest.java Прегледај датотеку

@@ -29,7 +29,7 @@ public class DivideTest {
29 29
     @Test
30 30
     public void test4() {
31 31
         // given
32
-        test(9.0, 63.0, 5.0);
32
+        test(12.6, 63.0, 5.0);
33 33
     }
34 34
 
35 35
     @Test
@@ -44,6 +44,6 @@ public class DivideTest {
44 44
         Double actual = calculator.divide(input1, input2);
45 45
 
46 46
         // then
47
-        Assert.assertEquals(expected, actual, 0);
47
+        Assert.assertEquals(expected, actual, 0.01);
48 48
     }
49 49
 }

+ 1
- 1
src/test/java/rocks/zipcode/quiz5/fundamentals/calculator/SquareTest.java Прегледај датотеку

@@ -44,6 +44,6 @@ public class SquareTest {
44 44
         Double actual = calculator.square(input);
45 45
 
46 46
         // then
47
-        Assert.assertEquals(expected, actual, 0);
47
+        Assert.assertEquals(expected, actual, 0.01);
48 48
     }
49 49
 }

+ 1
- 1
src/test/java/rocks/zipcode/quiz5/fundamentals/stringutils/HasDuplicateConsecutiveCharactersTest.java Прегледај датотеку

@@ -8,7 +8,7 @@ public class HasDuplicateConsecutiveCharactersTest {
8 8
     @Test
9 9
     public void test1() {
10 10
         String input = "Happy";
11
-        Assert.assertFalse(StringUtils.hasDuplicateConsecutiveCharacters(input));
11
+        Assert.assertTrue(StringUtils.hasDuplicateConsecutiveCharacters(input));
12 12
     }
13 13
 
14 14
     @Test

+ 2
- 2
src/test/java/rocks/zipcode/quiz5/objectorientation/employee/EmployeePolymorphismTest.java Прегледај датотеку

@@ -24,8 +24,8 @@ public class EmployeePolymorphismTest {
24 24
     }
25 25
 
26 26
 
27
-    @Test
27
+    @Test(expected = ClassCastException.class)
28 28
     public void test3() {
29
-        Assert.assertFalse((Account) (Object) employee instanceof Account);
29
+        Account account = (Account) (Object) employee;
30 30
     }
31 31
 }