-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGreaterValueTest.java
More file actions
61 lines (40 loc) · 1.19 KB
/
Copy pathGreaterValueTest.java
File metadata and controls
61 lines (40 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import algorithms.GreaterValue;
import org.testng.Assert;
import org.testng.annotations.Test;
public class GreaterValueTest {
@Test
public void aGreaterThanB_HappyPath() {
int a = 18;
int b = 10;
int expectedResult = 18;
int actualResult = new GreaterValue().greaterValue(a, b);
Assert.assertEquals(actualResult, expectedResult);
}
@Test
public void aLesserThanB_HappyPath() {
int a = 23;
int b = 57;
int expectedResult = 57;
int actualResult = new GreaterValue().greaterValue(a, b);
Assert.assertEquals(actualResult, expectedResult);
}
@Test
public void aEqualToB_Negative() {
int a = 35;
int b = 35;
int expectedResult = 0;
int actualResult = new GreaterValue().greaterValue(a, b);
Assert.assertEquals(actualResult, expectedResult);
}
/*
Variable might not have been initialized
@Test
public void oneNumNotDefined() {
int a;
int b = 63;
int expectedResult = 0;
int actualResult = new GreaterValue().biggerValue(a, b);
Assert.assertEquals(actualResult, expectedResult);
}
*/
}