|
@@ -1,7 +1,9 @@
|
1
|
1
|
package com.zipcodewilmington.danny_do_better_exercises;
|
2
|
2
|
|
3
|
3
|
import org.junit.Test;
|
|
4
|
+
|
4
|
5
|
import static org.junit.Assert.*;
|
|
6
|
+
|
5
|
7
|
/**
|
6
|
8
|
* Created by dan on 6/14/17.
|
7
|
9
|
*/
|
|
@@ -9,7 +11,7 @@ public class TestPredicateUtilities {
|
9
|
11
|
private static volatile PredicateUtilities math = new PredicateUtilities();
|
10
|
12
|
|
11
|
13
|
@Test
|
12
|
|
- public void testGreaterThanTrue(){
|
|
14
|
+ public void testGreaterThanTrue() {
|
13
|
15
|
// : Given
|
14
|
16
|
int greaterValue = 450;
|
15
|
17
|
int lesserValue = 350;
|
|
@@ -24,7 +26,7 @@ public class TestPredicateUtilities {
|
24
|
26
|
|
25
|
27
|
|
26
|
28
|
@Test
|
27
|
|
- public void testGreaterThanFalse(){
|
|
29
|
+ public void testGreaterThanFalse() {
|
28
|
30
|
// : Given
|
29
|
31
|
int greaterValue = 350;
|
30
|
32
|
int lesserValue = 350;
|
|
@@ -33,12 +35,12 @@ public class TestPredicateUtilities {
|
33
|
35
|
boolean outcome = math.isGreaterThan(greaterValue, lesserValue);
|
34
|
36
|
|
35
|
37
|
// : Then
|
36
|
|
- assertTrue(outcome);
|
|
38
|
+ assertFalse(outcome);
|
37
|
39
|
}
|
38
|
40
|
|
39
|
41
|
|
40
|
42
|
@Test
|
41
|
|
- public void testLessThanTrue(){
|
|
43
|
+ public void testLessThanTrue() {
|
42
|
44
|
// : Given
|
43
|
45
|
int greaterValue = 450;
|
44
|
46
|
int lesserValue = 350;
|
|
@@ -51,9 +53,8 @@ public class TestPredicateUtilities {
|
51
|
53
|
}
|
52
|
54
|
|
53
|
55
|
|
54
|
|
-
|
55
|
56
|
@Test
|
56
|
|
- public void testLessThan1(){
|
|
57
|
+ public void testLessThan1() {
|
57
|
58
|
// : Given
|
58
|
59
|
int greaterValue = 450;
|
59
|
60
|
int lesserValue = 350;
|
|
@@ -62,12 +63,12 @@ public class TestPredicateUtilities {
|
62
|
63
|
boolean outcome = math.isLessThan(greaterValue, lesserValue);
|
63
|
64
|
|
64
|
65
|
// : Then
|
65
|
|
- assertTrue(outcome);
|
|
66
|
+ assertFalse(outcome);
|
66
|
67
|
}
|
67
|
68
|
|
68
|
69
|
|
69
|
70
|
@Test
|
70
|
|
- public void testLessOrEqual1(){
|
|
71
|
+ public void testLessOrEqual1() {
|
71
|
72
|
// : Given
|
72
|
73
|
int greaterValue = 3;
|
73
|
74
|
int lesserValue = 3;
|
|
@@ -80,7 +81,7 @@ public class TestPredicateUtilities {
|
80
|
81
|
}
|
81
|
82
|
|
82
|
83
|
@Test
|
83
|
|
- public void testLessOrEqual2(){
|
|
84
|
+ public void testLessOrEqual2() {
|
84
|
85
|
// : Given
|
85
|
86
|
int greaterValue = 3;
|
86
|
87
|
int lesserValue = 6;
|
|
@@ -93,7 +94,7 @@ public class TestPredicateUtilities {
|
93
|
94
|
}
|
94
|
95
|
|
95
|
96
|
@Test
|
96
|
|
- public void testGreaterOrEqual1(){
|
|
97
|
+ public void testGreaterOrEqual1() {
|
97
|
98
|
// : Given
|
98
|
99
|
int greaterValue = 4;
|
99
|
100
|
int lesserValue = 4;
|
|
@@ -107,7 +108,7 @@ public class TestPredicateUtilities {
|
107
|
108
|
|
108
|
109
|
|
109
|
110
|
@Test
|
110
|
|
- public void testGreaterOrEqual2(){
|
|
111
|
+ public void testGreaterOrEqual2() {
|
111
|
112
|
// : Given
|
112
|
113
|
int greaterValue = 8;
|
113
|
114
|
int lesserValue = 15;
|
|
@@ -116,6 +117,6 @@ public class TestPredicateUtilities {
|
116
|
117
|
boolean outcome = math.isGreaterThanOrEqualTo(greaterValue, lesserValue);
|
117
|
118
|
|
118
|
119
|
// : Then
|
119
|
|
- assertTrue(outcome);
|
|
120
|
+ assertFalse(outcome);
|
120
|
121
|
}
|
121
|
122
|
}
|