-
Notifications
You must be signed in to change notification settings - Fork 4.1k
/
Copy pathGettingStartedTest.java
42 lines (34 loc) · 1.01 KB
/
GettingStartedTest.java
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
package tudelft.gettingstarted;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class GettingStartedTest {
@Test
public void addFiveTo20() {
int result = new GettingStarted().addFive(20);
Assertions.assertEquals(25,result);
}
// UNCOMMENT THE CODE BELOW, AND FILL THE GAPS!
// @Test
// public void addFiveToZero() {
// int result = new GettingStarted().addFive(???);
// Assertions.assertEquals(???, result);
// }
//
// @Test
// public void addFiveToMinus20() {
// int result = new GettingStarted().addFive(???);
// Assertions.assertEquals(????,result);
// }
@Test
// Add the correct numbers
public void addFiveToZero() {
int result = new GettingStarted().addFive(0);
Assertions.assertEquals(5,result);
}
@Test
// Write this test
public void addFiveToMinusTwenty() {
int result = new GettingStarted().addFive(-20);
Assertions.assertEquals(-15,result);
}
}