1
1
import org .junit .jupiter .api .Disabled ;
2
+ import org .junit .jupiter .api .DisplayName ;
2
3
import org .junit .jupiter .api .Test ;
3
4
4
5
import static org .assertj .core .api .Assertions .assertThat ;
@@ -8,6 +9,7 @@ public class RobotTest {
8
9
/* Create robot */
9
10
10
11
@ Test
12
+ @ DisplayName ("at origin facing north" )
11
13
public void atOriginFacingNorth () {
12
14
Orientation initialOrientation = Orientation .NORTH ;
13
15
GridPosition initialGridPosition = new GridPosition (0 , 0 );
@@ -19,6 +21,7 @@ public void atOriginFacingNorth() {
19
21
20
22
@ Disabled ("Remove to run test" )
21
23
@ Test
24
+ @ DisplayName ("at negative position facing south" )
22
25
public void atNegativePositionFacingSouth () {
23
26
GridPosition initialGridPosition = new GridPosition (-1 , -1 );
24
27
Orientation initialOrientation = Orientation .SOUTH ;
@@ -32,6 +35,7 @@ public void atNegativePositionFacingSouth() {
32
35
33
36
@ Disabled ("Remove to run test" )
34
37
@ Test
38
+ @ DisplayName ("changes north to east" )
35
39
public void changesNorthToEast () {
36
40
GridPosition initialGridPosition = new GridPosition (0 , 0 );
37
41
Robot robot = new Robot (initialGridPosition , Orientation .NORTH );
@@ -45,6 +49,7 @@ public void changesNorthToEast() {
45
49
46
50
@ Disabled ("Remove to run test" )
47
51
@ Test
52
+ @ DisplayName ("changes east to south" )
48
53
public void changesEastToSouth () {
49
54
GridPosition initialGridPosition = new GridPosition (0 , 0 );
50
55
Robot robot = new Robot (initialGridPosition , Orientation .EAST );
@@ -58,6 +63,7 @@ public void changesEastToSouth() {
58
63
59
64
@ Disabled ("Remove to run test" )
60
65
@ Test
66
+ @ DisplayName ("changes south to west" )
61
67
public void changesSouthToWest () {
62
68
GridPosition initialGridPosition = new GridPosition (0 , 0 );
63
69
Robot robot = new Robot (initialGridPosition , Orientation .SOUTH );
@@ -71,6 +77,7 @@ public void changesSouthToWest() {
71
77
72
78
@ Disabled ("Remove to run test" )
73
79
@ Test
80
+ @ DisplayName ("changes west to north" )
74
81
public void changesWestToNorth () {
75
82
GridPosition initialGridPosition = new GridPosition (0 , 0 );
76
83
Robot robot = new Robot (initialGridPosition , Orientation .WEST );
@@ -86,6 +93,7 @@ public void changesWestToNorth() {
86
93
87
94
@ Disabled ("Remove to run test" )
88
95
@ Test
96
+ @ DisplayName ("changes north to west" )
89
97
public void changesNorthToWest () {
90
98
GridPosition initialGridPosition = new GridPosition (0 , 0 );
91
99
Robot robot = new Robot (initialGridPosition , Orientation .NORTH );
@@ -99,6 +107,7 @@ public void changesNorthToWest() {
99
107
100
108
@ Disabled ("Remove to run test" )
101
109
@ Test
110
+ @ DisplayName ("changes west to south" )
102
111
public void changesWestToSouth () {
103
112
GridPosition initialGridPosition = new GridPosition (0 , 0 );
104
113
Robot robot = new Robot (initialGridPosition , Orientation .WEST );
@@ -112,6 +121,7 @@ public void changesWestToSouth() {
112
121
113
122
@ Disabled ("Remove to run test" )
114
123
@ Test
124
+ @ DisplayName ("changes south to east" )
115
125
public void changesSouthToEast () {
116
126
GridPosition initialGridPosition = new GridPosition (0 , 0 );
117
127
Robot robot = new Robot (initialGridPosition , Orientation .SOUTH );
@@ -125,6 +135,7 @@ public void changesSouthToEast() {
125
135
126
136
@ Disabled ("Remove to run test" )
127
137
@ Test
138
+ @ DisplayName ("changes east to north" )
128
139
public void changesEastToNorth () {
129
140
GridPosition initialGridPosition = new GridPosition (0 , 0 );
130
141
Robot robot = new Robot (initialGridPosition , Orientation .EAST );
@@ -140,6 +151,7 @@ public void changesEastToNorth() {
140
151
141
152
@ Disabled ("Remove to run test" )
142
153
@ Test
154
+ @ DisplayName ("facing north increments Y" )
143
155
public void facingNorthIncrementsY () {
144
156
Orientation initialOrientation = Orientation .NORTH ;
145
157
Robot robot = new Robot (new GridPosition (0 , 0 ), initialOrientation );
@@ -153,6 +165,7 @@ public void facingNorthIncrementsY() {
153
165
154
166
@ Disabled ("Remove to run test" )
155
167
@ Test
168
+ @ DisplayName ("facing south decrements Y" )
156
169
public void facingSouthDecrementsY () {
157
170
Orientation initialOrientation = Orientation .SOUTH ;
158
171
Robot robot = new Robot (new GridPosition (0 , 0 ), initialOrientation );
@@ -166,6 +179,7 @@ public void facingSouthDecrementsY() {
166
179
167
180
@ Disabled ("Remove to run test" )
168
181
@ Test
182
+ @ DisplayName ("facing east increments X" )
169
183
public void facingEastIncrementsX () {
170
184
Orientation initialOrientation = Orientation .EAST ;
171
185
Robot robot = new Robot (new GridPosition (0 , 0 ), initialOrientation );
@@ -179,6 +193,7 @@ public void facingEastIncrementsX() {
179
193
180
194
@ Disabled ("Remove to run test" )
181
195
@ Test
196
+ @ DisplayName ("facing west decrements X" )
182
197
public void facingWestDecrementsX () {
183
198
Orientation initialOrientation = Orientation .WEST ;
184
199
Robot robot = new Robot (new GridPosition (0 , 0 ), initialOrientation );
@@ -194,6 +209,7 @@ public void facingWestDecrementsX() {
194
209
195
210
@ Disabled ("Remove to run test" )
196
211
@ Test
212
+ @ DisplayName ("moving east and north from README" )
197
213
public void movingEastAndNorthFromReadme () {
198
214
Robot robot = new Robot (new GridPosition (7 , 3 ), Orientation .NORTH );
199
215
@@ -209,6 +225,7 @@ public void movingEastAndNorthFromReadme() {
209
225
210
226
@ Disabled ("Remove to run test" )
211
227
@ Test
228
+ @ DisplayName ("moving west and north" )
212
229
public void movingWestAndNorth () {
213
230
Robot robot = new Robot (new GridPosition (0 , 0 ), Orientation .NORTH );
214
231
@@ -223,6 +240,7 @@ public void movingWestAndNorth() {
223
240
224
241
@ Disabled ("Remove to run test" )
225
242
@ Test
243
+ @ DisplayName ("moving west and south" )
226
244
public void movingWestAndSouth () {
227
245
Robot robot = new Robot (new GridPosition (2 , -7 ), Orientation .EAST );
228
246
@@ -237,6 +255,7 @@ public void movingWestAndSouth() {
237
255
238
256
@ Disabled ("Remove to run test" )
239
257
@ Test
258
+ @ DisplayName ("moving east and north" )
240
259
public void movingEastAndNorth () {
241
260
Robot robot = new Robot (new GridPosition (8 , 4 ), Orientation .SOUTH );
242
261
0 commit comments