1
- import org .junit .Test ;
2
- import static org .assertj .core .api .Assertions .assertThat ;
1
+ import org .junit .jupiter .api .DisplayName ;
2
+ import org .junit .jupiter .api .Tag ;
3
+ import org .junit .jupiter .api .Test ;
4
+
5
+ import static org .assertj .core .api .Assertions .*;
3
6
4
7
public class AnnalynsInfiltrationTest {
8
+
5
9
@ Test
10
+ @ Tag ("task:1" )
11
+ @ DisplayName ("The canFastAttack method returns false when knight is awake" )
6
12
public void cannot_execute_fast_attack_if_knight_is_awake () {
7
13
boolean knightIsAwake = true ;
8
14
assertThat (AnnalynsInfiltration .canFastAttack (knightIsAwake )).isFalse ();
9
15
}
10
16
11
17
@ Test
18
+ @ Tag ("task:1" )
19
+ @ DisplayName ("The canFastAttack method returns true when knight is sleeping" )
12
20
public void can_execute_fast_attack_if_knight_is_sleeping () {
13
21
boolean knightIsAwake = false ;
14
22
assertThat (AnnalynsInfiltration .canFastAttack (knightIsAwake )).isTrue ();
15
23
}
16
24
17
25
@ Test
26
+ @ Tag ("task:2" )
27
+ @ DisplayName ("The canSpy method returns false when everyone is sleeping" )
18
28
public void cannot_spy_if_everyone_is_sleeping () {
19
29
boolean knightIsAwake = false ;
20
30
boolean archerIsAwake = false ;
@@ -23,6 +33,8 @@ public void cannot_spy_if_everyone_is_sleeping() {
23
33
}
24
34
25
35
@ Test
36
+ @ Tag ("task:2" )
37
+ @ DisplayName ("The canSpy method returns true when everyone but knight is sleeping" )
26
38
public void can_spy_if_everyone_but_knight_is_sleeping () {
27
39
boolean knightIsAwake = true ;
28
40
boolean archerIsAwake = false ;
@@ -31,6 +43,8 @@ public void can_spy_if_everyone_but_knight_is_sleeping() {
31
43
}
32
44
33
45
@ Test
46
+ @ Tag ("task:2" )
47
+ @ DisplayName ("The canSpy method returns true when everyone but archer is sleeping" )
34
48
public void can_spy_if_everyone_but_archer_is_sleeping () {
35
49
boolean knightIsAwake = false ;
36
50
boolean archerIsAwake = true ;
@@ -39,6 +53,8 @@ public void can_spy_if_everyone_but_archer_is_sleeping() {
39
53
}
40
54
41
55
@ Test
56
+ @ Tag ("task:2" )
57
+ @ DisplayName ("The canSpy method returns true when everyone but prisoner is sleeping" )
42
58
public void can_spy_if_everyone_but_prisoner_is_sleeping () {
43
59
boolean knightIsAwake = false ;
44
60
boolean archerIsAwake = false ;
@@ -47,6 +63,8 @@ public void can_spy_if_everyone_but_prisoner_is_sleeping() {
47
63
}
48
64
49
65
@ Test
66
+ @ Tag ("task:2" )
67
+ @ DisplayName ("The canSpy method returns true when only knight is sleeping" )
50
68
public void can_spy_if_only_knight_is_sleeping () {
51
69
boolean knightIsAwake = false ;
52
70
boolean archerIsAwake = true ;
@@ -55,6 +73,8 @@ public void can_spy_if_only_knight_is_sleeping() {
55
73
}
56
74
57
75
@ Test
76
+ @ Tag ("task:2" )
77
+ @ DisplayName ("The canSpy method returns true when only archer is sleeping" )
58
78
public void can_spy_if_only_archer_is_sleeping () {
59
79
boolean knightIsAwake = true ;
60
80
boolean archerIsAwake = false ;
@@ -63,6 +83,8 @@ public void can_spy_if_only_archer_is_sleeping() {
63
83
}
64
84
65
85
@ Test
86
+ @ Tag ("task:2" )
87
+ @ DisplayName ("The canSpy method returns true when only prisoner is sleeping" )
66
88
public void can_spy_if_only_prisoner_is_sleeping () {
67
89
boolean knightIsAwake = true ;
68
90
boolean archerIsAwake = true ;
@@ -71,6 +93,8 @@ public void can_spy_if_only_prisoner_is_sleeping() {
71
93
}
72
94
73
95
@ Test
96
+ @ Tag ("task:2" )
97
+ @ DisplayName ("The canSpy method returns true when everyone is awake" )
74
98
public void can_spy_if_everyone_is_awake () {
75
99
boolean knightIsAwake = true ;
76
100
boolean archerIsAwake = true ;
@@ -79,34 +103,44 @@ public void can_spy_if_everyone_is_awake() {
79
103
}
80
104
81
105
@ Test
106
+ @ Tag ("task:3" )
107
+ @ DisplayName ("The canSignalPrisoner method returns true when prisoner is awake and archer is sleeping" )
82
108
public void can_signal_prisoner_if_archer_is_sleeping_and_prisoner_is_awake () {
83
109
boolean archerIsAwake = false ;
84
110
boolean prisonerIsAwake = true ;
85
111
assertThat (AnnalynsInfiltration .canSignalPrisoner (archerIsAwake , prisonerIsAwake )).isTrue ();
86
112
}
87
113
88
114
@ Test
115
+ @ Tag ("task:3" )
116
+ @ DisplayName ("The canSignalPrisoner method returns false when prisoner is sleeping and archer is awake" )
89
117
public void cannot_signal_prisoner_if_archer_is_awake_and_prisoner_is_sleeping () {
90
118
boolean archerIsAwake = true ;
91
119
boolean prisonerIsAwake = false ;
92
120
assertThat (AnnalynsInfiltration .canSignalPrisoner (archerIsAwake , prisonerIsAwake )).isFalse ();
93
121
}
94
122
95
123
@ Test
124
+ @ Tag ("task:3" )
125
+ @ DisplayName ("The canSignalPrisoner method returns false when both prisoner and archer are sleeping" )
96
126
public void cannot_signal_prisoner_if_archer_and_prisoner_are_both_sleeping () {
97
127
boolean archerIsAwake = false ;
98
128
boolean prisonerIsAwake = false ;
99
129
assertThat (AnnalynsInfiltration .canSignalPrisoner (archerIsAwake , prisonerIsAwake )).isFalse ();
100
130
}
101
131
102
132
@ Test
133
+ @ Tag ("task:3" )
134
+ @ DisplayName ("The canSignalPrisoner method returns false when both prisoner and archer are awake" )
103
135
public void cannot_signal_prisoner_if_archer_and_prisoner_are_both_awake () {
104
136
boolean archerIsAwake = true ;
105
137
boolean prisonerIsAwake = true ;
106
138
assertThat (AnnalynsInfiltration .canSignalPrisoner (archerIsAwake , prisonerIsAwake )).isFalse ();
107
139
}
108
140
109
141
@ Test
142
+ @ Tag ("task:4" )
143
+ @ DisplayName ("The canFreePrisoner method returns false when everyone is awake and pet dog is present" )
110
144
public void cannot_release_prisoner_if_everyone_is_awake_and_pet_dog_is_present () {
111
145
boolean knightIsAwake = true ;
112
146
boolean archerIsAwake = true ;
@@ -117,6 +151,8 @@ public void cannot_release_prisoner_if_everyone_is_awake_and_pet_dog_is_present(
117
151
}
118
152
119
153
@ Test
154
+ @ Tag ("task:4" )
155
+ @ DisplayName ("The canFreePrisoner method returns false when everyone is awake and pet dog is absent" )
120
156
public void cannot_release_prisoner_if_everyone_is_awake_and_pet_dog_is_absent () {
121
157
boolean knightIsAwake = true ;
122
158
boolean archerIsAwake = true ;
@@ -127,6 +163,8 @@ public void cannot_release_prisoner_if_everyone_is_awake_and_pet_dog_is_absent()
127
163
}
128
164
129
165
@ Test
166
+ @ Tag ("task:4" )
167
+ @ DisplayName ("The canFreePrisoner method returns true when everyone is sleeping and pet dog is present" )
130
168
public void can_release_prisoner_if_everyone_is_asleep_and_pet_dog_is_present () {
131
169
boolean knightIsAwake = false ;
132
170
boolean archerIsAwake = false ;
@@ -137,6 +175,8 @@ public void can_release_prisoner_if_everyone_is_asleep_and_pet_dog_is_present()
137
175
}
138
176
139
177
@ Test
178
+ @ Tag ("task:4" )
179
+ @ DisplayName ("The canFreePrisoner method returns false when everyone is sleeping and pet dog is absent" )
140
180
public void cannot_release_prisoner_if_everyone_is_asleep_and_pet_dog_is_absent () {
141
181
boolean knightIsAwake = false ;
142
182
boolean archerIsAwake = false ;
@@ -147,6 +187,8 @@ public void cannot_release_prisoner_if_everyone_is_asleep_and_pet_dog_is_absent(
147
187
}
148
188
149
189
@ Test
190
+ @ Tag ("task:4" )
191
+ @ DisplayName ("The canFreePrisoner method returns true when only prisoner is awake and pet dog is present" )
150
192
public void can_release_prisoner_if_only_prisoner_is_awake_and_pet_dog_is_present () {
151
193
boolean knightIsAwake = false ;
152
194
boolean archerIsAwake = false ;
@@ -157,6 +199,8 @@ public void can_release_prisoner_if_only_prisoner_is_awake_and_pet_dog_is_presen
157
199
}
158
200
159
201
@ Test
202
+ @ Tag ("task:4" )
203
+ @ DisplayName ("The canFreePrisoner method returns true when only prisoner is awake and pet dog is absent" )
160
204
public void can_release_prisoner_if_only_prisoner_is_awake_and_pet_dog_is_absent () {
161
205
boolean knightIsAwake = false ;
162
206
boolean archerIsAwake = false ;
@@ -167,6 +211,8 @@ public void can_release_prisoner_if_only_prisoner_is_awake_and_pet_dog_is_absent
167
211
}
168
212
169
213
@ Test
214
+ @ Tag ("task:4" )
215
+ @ DisplayName ("The canFreePrisoner method returns false when only archer is awake and pet dog is present" )
170
216
public void cannot_release_prisoner_if_only_archer_is_awake_and_pet_dog_is_present () {
171
217
boolean knightIsAwake = false ;
172
218
boolean archerIsAwake = true ;
@@ -177,6 +223,8 @@ public void cannot_release_prisoner_if_only_archer_is_awake_and_pet_dog_is_prese
177
223
}
178
224
179
225
@ Test
226
+ @ Tag ("task:4" )
227
+ @ DisplayName ("The canFreePrisoner method returns false when only archer is awake and pet dog is absent" )
180
228
public void cannot_release_prisoner_if_only_archer_is_awake_and_pet_dog_is_absent () {
181
229
boolean knightIsAwake = false ;
182
230
boolean archerIsAwake = true ;
@@ -187,6 +235,8 @@ public void cannot_release_prisoner_if_only_archer_is_awake_and_pet_dog_is_absen
187
235
}
188
236
189
237
@ Test
238
+ @ Tag ("task:4" )
239
+ @ DisplayName ("The canFreePrisoner method returns true when only knight is awake and pet dog is present" )
190
240
public void can_release_prisoner_if_only_knight_is_awake_and_pet_dog_is_present () {
191
241
boolean knightIsAwake = true ;
192
242
boolean archerIsAwake = false ;
@@ -197,6 +247,8 @@ public void can_release_prisoner_if_only_knight_is_awake_and_pet_dog_is_present(
197
247
}
198
248
199
249
@ Test
250
+ @ Tag ("task:4" )
251
+ @ DisplayName ("The canFreePrisoner method returns false when only knight is awake and pet dog is absent" )
200
252
public void cannot_release_prisoner_if_only_knight_is_awake_and_pet_dog_is_absent () {
201
253
boolean knightIsAwake = true ;
202
254
boolean archerIsAwake = false ;
@@ -207,6 +259,8 @@ public void cannot_release_prisoner_if_only_knight_is_awake_and_pet_dog_is_absen
207
259
}
208
260
209
261
@ Test
262
+ @ Tag ("task:4" )
263
+ @ DisplayName ("The canFreePrisoner method returns false when only knight is sleeping and pet dog is present" )
210
264
public void cannot_release_prisoner_if_only_knight_is_asleep_and_pet_dog_is_present () {
211
265
boolean knightIsAwake = false ;
212
266
boolean archerIsAwake = true ;
@@ -217,6 +271,8 @@ public void cannot_release_prisoner_if_only_knight_is_asleep_and_pet_dog_is_pres
217
271
}
218
272
219
273
@ Test
274
+ @ Tag ("task:4" )
275
+ @ DisplayName ("The canFreePrisoner method returns false when only knight is sleeping and pet dog is absent" )
220
276
public void cannot_release_prisoner_if_only_knight_is_asleep_and_pet_dog_is_absent () {
221
277
boolean knightIsAwake = false ;
222
278
boolean archerIsAwake = true ;
@@ -227,6 +283,8 @@ public void cannot_release_prisoner_if_only_knight_is_asleep_and_pet_dog_is_abse
227
283
}
228
284
229
285
@ Test
286
+ @ Tag ("task:4" )
287
+ @ DisplayName ("The canFreePrisoner method returns true when only archer is sleeping and pet dog is present" )
230
288
public void can_release_prisoner_if_only_archer_is_asleep_and_pet_dog_is_present () {
231
289
boolean knightIsAwake = true ;
232
290
boolean archerIsAwake = false ;
@@ -237,6 +295,8 @@ public void can_release_prisoner_if_only_archer_is_asleep_and_pet_dog_is_present
237
295
}
238
296
239
297
@ Test
298
+ @ Tag ("task:4" )
299
+ @ DisplayName ("The canFreePrisoner method returns false when only archer is sleeping and pet dog is absent" )
240
300
public void cannot_release_prisoner_if_only_archer_is_asleep_and_pet_dog_is_absent () {
241
301
boolean knightIsAwake = true ;
242
302
boolean archerIsAwake = false ;
@@ -247,6 +307,8 @@ public void cannot_release_prisoner_if_only_archer_is_asleep_and_pet_dog_is_abse
247
307
}
248
308
249
309
@ Test
310
+ @ Tag ("task:4" )
311
+ @ DisplayName ("The canFreePrisoner method returns false when only prisoner is sleeping and pet dog is present" )
250
312
public void cannot_release_prisoner_if_only_prisoner_is_asleep_and_pet_dog_is_present () {
251
313
boolean knightIsAwake = true ;
252
314
boolean archerIsAwake = true ;
@@ -257,6 +319,8 @@ public void cannot_release_prisoner_if_only_prisoner_is_asleep_and_pet_dog_is_pr
257
319
}
258
320
259
321
@ Test
322
+ @ Tag ("task:4" )
323
+ @ DisplayName ("The canFreePrisoner method returns false when only prisoner is sleeping and pet dog is absent" )
260
324
public void cannot_release_prisoner_if_only_prisoner_is_asleep_and_pet_dog_is_absent () {
261
325
boolean knightIsAwake = true ;
262
326
boolean archerIsAwake = true ;
0 commit comments