|
|
|
|
|
|
13
|
assertTrue(robot.getGridPosition().equals(initialGridPosition));
|
13
|
assertTrue(robot.getGridPosition().equals(initialGridPosition));
|
|
14
|
}
|
14
|
}
|
|
15
|
|
15
|
|
|
16
|
- @Ignore
|
|
|
|
|
|
16
|
+ @Ignore("Remove to run test")
|
|
17
|
@Test
|
17
|
@Test
|
|
18
|
public void testRobotIsCreatedWithCorrectInitialOrientation() {
|
18
|
public void testRobotIsCreatedWithCorrectInitialOrientation() {
|
|
19
|
final Orientation initialOrientation = Orientation.NORTH;
|
19
|
final Orientation initialOrientation = Orientation.NORTH;
|
|
|
|
|
|
|
22
|
assertTrue(robot.getOrientation().equals(initialOrientation));
|
22
|
assertTrue(robot.getOrientation().equals(initialOrientation));
|
|
23
|
}
|
23
|
}
|
|
24
|
|
24
|
|
|
25
|
- @Ignore
|
|
|
|
|
|
25
|
+ @Ignore("Remove to run test")
|
|
26
|
@Test
|
26
|
@Test
|
|
27
|
public void testTurningRightDoesNotChangePosition() {
|
27
|
public void testTurningRightDoesNotChangePosition() {
|
|
28
|
final GridPosition initialGridPosition = new GridPosition(0, 0);
|
28
|
final GridPosition initialGridPosition = new GridPosition(0, 0);
|
|
|
|
|
|
|
33
|
assertTrue(robot.getGridPosition().equals(initialGridPosition));
|
33
|
assertTrue(robot.getGridPosition().equals(initialGridPosition));
|
|
34
|
}
|
34
|
}
|
|
35
|
|
35
|
|
|
36
|
- @Ignore
|
|
|
|
|
|
36
|
+ @Ignore("Remove to run test")
|
|
37
|
@Test
|
37
|
@Test
|
|
38
|
public void testTurningRightCorrectlyChangesOrientationFromNorthToEast() {
|
38
|
public void testTurningRightCorrectlyChangesOrientationFromNorthToEast() {
|
|
39
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.NORTH);
|
39
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.NORTH);
|
|
|
|
|
|
|
45
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
45
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
|
46
|
}
|
46
|
}
|
|
47
|
|
47
|
|
|
48
|
- @Ignore
|
|
|
|
|
|
48
|
+ @Ignore("Remove to run test")
|
|
49
|
@Test
|
49
|
@Test
|
|
50
|
public void testTurningRightCorrectlyChangesOrientationFromEastToSouth() {
|
50
|
public void testTurningRightCorrectlyChangesOrientationFromEastToSouth() {
|
|
51
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.EAST);
|
51
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.EAST);
|
|
|
|
|
|
|
57
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
57
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
|
58
|
}
|
58
|
}
|
|
59
|
|
59
|
|
|
60
|
- @Ignore
|
|
|
|
|
|
60
|
+ @Ignore("Remove to run test")
|
|
61
|
@Test
|
61
|
@Test
|
|
62
|
public void testTurningRightCorrectlyChangesOrientationFromSouthToWest() {
|
62
|
public void testTurningRightCorrectlyChangesOrientationFromSouthToWest() {
|
|
63
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.SOUTH);
|
63
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.SOUTH);
|
|
|
|
|
|
|
69
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
69
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
|
70
|
}
|
70
|
}
|
|
71
|
|
71
|
|
|
72
|
- @Ignore
|
|
|
|
|
|
72
|
+ @Ignore("Remove to run test")
|
|
73
|
@Test
|
73
|
@Test
|
|
74
|
public void testTurningRightCorrectlyChangesOrientationFromWestToNorth() {
|
74
|
public void testTurningRightCorrectlyChangesOrientationFromWestToNorth() {
|
|
75
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.WEST);
|
75
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.WEST);
|
|
|
|
|
|
|
81
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
81
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
|
82
|
}
|
82
|
}
|
|
83
|
|
83
|
|
|
84
|
- @Ignore
|
|
|
|
|
|
84
|
+ @Ignore("Remove to run test")
|
|
85
|
@Test
|
85
|
@Test
|
|
86
|
public void testTurningLeftDoesNotChangePosition() {
|
86
|
public void testTurningLeftDoesNotChangePosition() {
|
|
87
|
final GridPosition initialGridPosition = new GridPosition(0, 0);
|
87
|
final GridPosition initialGridPosition = new GridPosition(0, 0);
|
|
|
|
|
|
|
92
|
assertTrue(robot.getGridPosition().equals(initialGridPosition));
|
92
|
assertTrue(robot.getGridPosition().equals(initialGridPosition));
|
|
93
|
}
|
93
|
}
|
|
94
|
|
94
|
|
|
95
|
- @Ignore
|
|
|
|
|
|
95
|
+ @Ignore("Remove to run test")
|
|
96
|
@Test
|
96
|
@Test
|
|
97
|
public void testTurningLeftCorrectlyChangesOrientationFromNorthToWest() {
|
97
|
public void testTurningLeftCorrectlyChangesOrientationFromNorthToWest() {
|
|
98
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.NORTH);
|
98
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.NORTH);
|
|
|
|
|
|
|
104
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
104
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
|
105
|
}
|
105
|
}
|
|
106
|
|
106
|
|
|
107
|
- @Ignore
|
|
|
|
|
|
107
|
+ @Ignore("Remove to run test")
|
|
108
|
@Test
|
108
|
@Test
|
|
109
|
public void testTurningLeftCorrectlyChangesOrientationFromWestToSouth() {
|
109
|
public void testTurningLeftCorrectlyChangesOrientationFromWestToSouth() {
|
|
110
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.WEST);
|
110
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.WEST);
|
|
|
|
|
|
|
116
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
116
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
|
117
|
}
|
117
|
}
|
|
118
|
|
118
|
|
|
119
|
- @Ignore
|
|
|
|
|
|
119
|
+ @Ignore("Remove to run test")
|
|
120
|
@Test
|
120
|
@Test
|
|
121
|
public void testTurningLeftCorrectlyChangesOrientationFromSouthToEast() {
|
121
|
public void testTurningLeftCorrectlyChangesOrientationFromSouthToEast() {
|
|
122
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.SOUTH);
|
122
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.SOUTH);
|
|
|
|
|
|
|
128
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
128
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
|
129
|
}
|
129
|
}
|
|
130
|
|
130
|
|
|
131
|
- @Ignore
|
|
|
|
|
|
131
|
+ @Ignore("Remove to run test")
|
|
132
|
@Test
|
132
|
@Test
|
|
133
|
public void testTurningLeftCorrectlyChangesOrientationFromEastToNorth() {
|
133
|
public void testTurningLeftCorrectlyChangesOrientationFromEastToNorth() {
|
|
134
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.EAST);
|
134
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.EAST);
|
|
|
|
|
|
|
140
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
140
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
|
141
|
}
|
141
|
}
|
|
142
|
|
142
|
|
|
143
|
- @Ignore
|
|
|
|
|
|
143
|
+ @Ignore("Remove to run test")
|
|
144
|
@Test
|
144
|
@Test
|
|
145
|
public void testAdvancingDoesNotChangeOrientation() {
|
145
|
public void testAdvancingDoesNotChangeOrientation() {
|
|
146
|
final Orientation initialOrientation = Orientation.NORTH;
|
146
|
final Orientation initialOrientation = Orientation.NORTH;
|
|
|
|
|
|
|
151
|
assertTrue(robot.getOrientation().equals(initialOrientation));
|
151
|
assertTrue(robot.getOrientation().equals(initialOrientation));
|
|
152
|
}
|
152
|
}
|
|
153
|
|
153
|
|
|
154
|
- @Ignore
|
|
|
|
|
|
154
|
+ @Ignore("Remove to run test")
|
|
155
|
@Test
|
155
|
@Test
|
|
156
|
public void testAdvancingWhenFacingNorthIncreasesYCoordinateByOne() {
|
156
|
public void testAdvancingWhenFacingNorthIncreasesYCoordinateByOne() {
|
|
157
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.NORTH);
|
157
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.NORTH);
|
|
|
|
|
|
|
163
|
assertTrue(robot.getGridPosition().equals(expectedGridPosition));
|
163
|
assertTrue(robot.getGridPosition().equals(expectedGridPosition));
|
|
164
|
}
|
164
|
}
|
|
165
|
|
165
|
|
|
166
|
- @Ignore
|
|
|
|
|
|
166
|
+ @Ignore("Remove to run test")
|
|
167
|
@Test
|
167
|
@Test
|
|
168
|
public void testAdvancingWhenFacingSouthDecreasesYCoordinateByOne() {
|
168
|
public void testAdvancingWhenFacingSouthDecreasesYCoordinateByOne() {
|
|
169
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.SOUTH);
|
169
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.SOUTH);
|
|
|
|
|
|
|
175
|
assertTrue(robot.getGridPosition().equals(expectedGridPosition));
|
175
|
assertTrue(robot.getGridPosition().equals(expectedGridPosition));
|
|
176
|
}
|
176
|
}
|
|
177
|
|
177
|
|
|
178
|
- @Ignore
|
|
|
|
|
|
178
|
+ @Ignore("Remove to run test")
|
|
179
|
@Test
|
179
|
@Test
|
|
180
|
public void testAdvancingWhenFacingEastIncreasesXCoordinateByOne() {
|
180
|
public void testAdvancingWhenFacingEastIncreasesXCoordinateByOne() {
|
|
181
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.EAST);
|
181
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.EAST);
|
|
|
|
|
|
|
187
|
assertTrue(robot.getGridPosition().equals(expectedGridPosition));
|
187
|
assertTrue(robot.getGridPosition().equals(expectedGridPosition));
|
|
188
|
}
|
188
|
}
|
|
189
|
|
189
|
|
|
190
|
- @Ignore
|
|
|
|
|
|
190
|
+ @Ignore("Remove to run test")
|
|
191
|
@Test
|
191
|
@Test
|
|
192
|
public void testAdvancingWhenFacingWestDecreasesXCoordinateByOne() {
|
192
|
public void testAdvancingWhenFacingWestDecreasesXCoordinateByOne() {
|
|
193
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.WEST);
|
193
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.WEST);
|
|
|
|
|
|
|
199
|
assertTrue(robot.getGridPosition().equals(expectedGridPosition));
|
199
|
assertTrue(robot.getGridPosition().equals(expectedGridPosition));
|
|
200
|
}
|
200
|
}
|
|
201
|
|
201
|
|
|
202
|
- @Ignore
|
|
|
|
|
|
202
|
+ @Ignore("Remove to run test")
|
|
203
|
@Test
|
203
|
@Test
|
|
204
|
public void testInstructionsToMoveWestAndNorth() {
|
204
|
public void testInstructionsToMoveWestAndNorth() {
|
|
205
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.NORTH);
|
205
|
final Robot robot = new Robot(new GridPosition(0, 0), Orientation.NORTH);
|
|
|
|
|
|
|
213
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
213
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
|
214
|
}
|
214
|
}
|
|
215
|
|
215
|
|
|
216
|
- @Ignore
|
|
|
|
|
|
216
|
+ @Ignore("Remove to run test")
|
|
217
|
@Test
|
217
|
@Test
|
|
218
|
public void testInstructionsToMoveWestAndSouth() {
|
218
|
public void testInstructionsToMoveWestAndSouth() {
|
|
219
|
final Robot robot = new Robot(new GridPosition(2, -7), Orientation.EAST);
|
219
|
final Robot robot = new Robot(new GridPosition(2, -7), Orientation.EAST);
|
|
|
|
|
|
|
227
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
227
|
assertTrue(robot.getOrientation().equals(expectedOrientation));
|
|
228
|
}
|
228
|
}
|
|
229
|
|
229
|
|
|
230
|
- @Ignore
|
|
|
|
|
|
230
|
+ @Ignore("Remove to run test")
|
|
231
|
@Test
|
231
|
@Test
|
|
232
|
public void testInstructionsToMoveEastAndNorth() {
|
232
|
public void testInstructionsToMoveEastAndNorth() {
|
|
233
|
final Robot robot = new Robot(new GridPosition(8, 4), Orientation.SOUTH);
|
233
|
final Robot robot = new Robot(new GridPosition(8, 4), Orientation.SOUTH);
|