forked from exercism/java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFootballMatchReportsTest.java
More file actions
81 lines (69 loc) · 2.85 KB
/
Copy pathFootballMatchReportsTest.java
File metadata and controls
81 lines (69 loc) · 2.85 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class FootballMatchReportsTest {
@Test
@Tag("task:1")
@DisplayName("The onField method returns the correct description of player with shirt number 1")
public void test_goal() {
assertThat(FootballMatchReports.onField(1)).isEqualTo("goalie");
}
@Test
@Tag("task:1")
@DisplayName("The onField method returns the correct description of player with shirt number 2")
public void test_left_back() {
assertThat(FootballMatchReports.onField(2)).isEqualTo("left back");
}
@Test
@Tag("task:1")
@DisplayName("The onField method returns the correct description of player with shirt number 5")
public void test_right_back() {
assertThat(FootballMatchReports.onField(5)).isEqualTo("right back");
}
@Test
@Tag("task:1")
@DisplayName("The onField method returns the correct description of players with shirt numbers 3 and 4")
public void test_center_back() {
assertThat(FootballMatchReports.onField(3)).isEqualTo("center back");
assertThat(FootballMatchReports.onField(4)).isEqualTo("center back");
}
@Test
@Tag("task:1")
@DisplayName("The onField method returns the correct description of players with shirt numbers 6, 7 and 8")
public void test_midfielder() {
assertThat(FootballMatchReports.onField(6)).isEqualTo("midfielder");
assertThat(FootballMatchReports.onField(7)).isEqualTo("midfielder");
assertThat(FootballMatchReports.onField(8)).isEqualTo("midfielder");
}
@Test
@Tag("task:1")
@DisplayName("The onField method returns the correct description of player with shirt number 9")
public void test_left_wing() {
assertThat(FootballMatchReports.onField(9)).isEqualTo("left wing");
}
@Test
@Tag("task:1")
@DisplayName("The onField method returns the correct description of player with shirt number 10")
public void test_striker() {
assertThat(FootballMatchReports.onField(10)).isEqualTo("striker");
}
@Test
@Tag("task:1")
@DisplayName("The onField method returns the correct description of player with shirt number 11")
public void test_right_wing() {
assertThat(FootballMatchReports.onField(11)).isEqualTo("right wing");
}
@Test
@Tag("task:2")
@DisplayName("The onField method returns 'unknown' for unknown shirt number")
public void test_exception() {
assertThat(FootballMatchReports.onField(13)).isEqualTo("unknown");
}
@Test
@Tag("task:2")
@DisplayName("The onField method returns 'unknown' for negative shirt number")
public void test_exception_negative_number() {
assertThat(FootballMatchReports.onField(-1)).isEqualTo("unknown");
}
}