Skip to content

Latest commit

 

History

History
563 lines (335 loc) · 11.7 KB

mars-rover.md

File metadata and controls

563 lines (335 loc) · 11.7 KB

✔️ Mars Rover

Failed: 0
Passed: 1
Total: 1
Duration: ⏲ 1484 ms

✔️ MarsRover.feature

✔️ Move the rover forward

Input
direction x y
N 0 -1

✔️ Given I have a Mars Rover

Step log

​Creating a new rover​ @ 236 ms
​Rover created​ @ 237 ms
​Rover​ ​Moving to 0,-1​ @ 357 ms

✔️ When I set the initial starting point to 0,0

Step log

​Rover moved to 0 0​ @ 243 ms

✔️ When I set the initial direction to N

Step log

​Rover direction set to N​ @ 248 ms

✔️ When I move the Mars Rover forward 1 square

Step log

​Move rover forward​ @ 256 ms

✔️ Soon the current position should be 0,-1

Step log

​Current position is 0 0​ @ 262 ms
​Current position is 0 -1​ @ 366 ms


✔️ Move the rover forward

Input
direction x y
S 0 1

✔️ Given I have a Mars Rover

Step log

​Creating a new rover​ @ 366 ms
​Rover created​ @ 367 ms
​Rover​ ​Moving to 0,1​ @ 489 ms

✔️ When I set the initial starting point to 0,0

Step log

​Rover moved to 0 0​ @ 376 ms

✔️ When I set the initial direction to S

Step log

​Rover direction set to S​ @ 382 ms

✔️ When I move the Mars Rover forward 1 square

Step log

​Move rover forward​ @ 389 ms

✔️ Soon the current position should be 0,1

Step log

​Current position is 0 0​ @ 396 ms
​Current position is 0 1​ @ 496 ms


✔️ Move the rover forward

Input
direction x y
E 1 0

✔️ Given I have a Mars Rover

Step log

​Creating a new rover​ @ 497 ms
​Rover created​ @ 497 ms
​Rover​ ​Moving to 1,0​ @ 620 ms

✔️ When I set the initial starting point to 0,0

Step log

​Rover moved to 0 0​ @ 506 ms

✔️ When I set the initial direction to E

Step log

​Rover direction set to E​ @ 513 ms

✔️ When I move the Mars Rover forward 1 square

Step log

​Move rover forward​ @ 519 ms

✔️ Soon the current position should be 1,0

Step log

​Current position is 0 0​ @ 525 ms
​Current position is 1 0​ @ 626 ms


✔️ Move the rover forward

Input
direction x y
W -1 0

✔️ Given I have a Mars Rover

Step log

​Creating a new rover​ @ 626 ms
​Rover created​ @ 626 ms
​Rover​ ​Moving to -1,0​ @ 747 ms

✔️ When I set the initial starting point to 0,0

Step log

​Rover moved to 0 0​ @ 635 ms

✔️ When I set the initial direction to W

Step log

​Rover direction set to W​ @ 641 ms

✔️ When I move the Mars Rover forward 1 square

Step log

​Move rover forward​ @ 646 ms

✔️ Soon the current position should be -1,0

Step log

​Current position is 0 0​ @ 652 ms
​Current position is -1 0​ @ 753 ms


✔️ Move the rover backward

Input
direction x y
N 0 1

✔️ Given I have a Mars Rover

Step log

​Creating a new rover​ @ 755 ms
​Rover created​ @ 755 ms
​Rover​ ​Moving to 0,1​ @ 876 ms

✔️ When I set the initial starting point to 0,0

Step log

​Rover moved to 0 0​ @ 763 ms

✔️ When I set the initial direction to N

Step log

​Rover direction set to N​ @ 769 ms

✔️ When I move the Mars Rover backward 1 square

Step log

​Move rover backward​ @ 775 ms

✔️ Soon the current position should be 0,1

Step log

​Current position is 0 0​ @ 781 ms
​Current position is 0 1​ @ 882 ms


✔️ Move the rover backward

Input
direction x y
S 0 -1

✔️ Given I have a Mars Rover

Step log

​Creating a new rover​ @ 882 ms
​Rover created​ @ 882 ms
​Rover​ ​Moving to 0,-1​ @ 1005 ms

✔️ When I set the initial starting point to 0,0

Step log

​Rover moved to 0 0​ @ 892 ms

✔️ When I set the initial direction to S

Step log

​Rover direction set to S​ @ 898 ms

✔️ When I move the Mars Rover backward 1 square

Step log

​Move rover backward​ @ 905 ms

✔️ Soon the current position should be 0,-1

Step log

​Current position is 0 0​ @ 911 ms
​Current position is 0 -1​ @ 1011 ms


✔️ Move the rover backward

Input
direction x y
E -1 0

✔️ Given I have a Mars Rover

Step log

​Creating a new rover​ @ 1012 ms
​Rover created​ @ 1012 ms
​Rover​ ​Moving to -1,0​ @ 1136 ms

✔️ When I set the initial starting point to 0,0

Step log

​Rover moved to 0 0​ @ 1021 ms

✔️ When I set the initial direction to E

Step log

​Rover direction set to E​ @ 1029 ms

✔️ When I move the Mars Rover backward 1 square

Step log

​Move rover backward​ @ 1035 ms

✔️ Soon the current position should be -1,0

Step log

​Current position is 0 0​ @ 1041 ms
​Current position is -1 0​ @ 1141 ms


✔️ Move the rover backward

Input
direction x y
W 1 0

✔️ Given I have a Mars Rover

Step log

​Creating a new rover​ @ 1141 ms
​Rover created​ @ 1141 ms
​Rover​ ​Moving to 1,0​ @ 1260 ms

✔️ When I set the initial starting point to 0,0

Step log

​Rover moved to 0 0​ @ 1149 ms

✔️ When I set the initial direction to W

Step log

​Rover direction set to W​ @ 1154 ms

✔️ When I move the Mars Rover backward 1 square

Step log

​Move rover backward​ @ 1159 ms

✔️ Soon the current position should be 1,0

Step log

​Current position is 0 0​ @ 1165 ms
​Current position is 1 0​ @ 1265 ms


✔️ Hit an obstacle

✔️ Given I have a Mars Rover

Step log

​Creating a new rover​ @ 1266 ms
​Rover created​ @ 1266 ms
​Rover​ ​Moving to 0,-1​ @ 1396 ms
​Rover​ ​Moving to 0,-2​ @ 1497 ms
​Rover​ ​Moving to 0,-3​ @ 1597 ms
​Rover​ ​Moving to 0,-4​ @ 1699 ms

✔️ Given there is an obstacle at 0,-5

✔️ When I set the initial starting point to 0,0

Step log

​Rover moved to 0 0​ @ 1283 ms

✔️ When I set the initial direction to N

Step log

​Rover direction set to N​ @ 1290 ms

✔️ When I move the Mars Rover forward 10 squares

Step log

​Move rover forward​ @ 1296 ms

✔️ Soon the current position should be 0,-4

Step log

​Current position is 0 0​ @ 1301 ms
​Current position is 0 -1​ @ 1402 ms
​Current position is 0 -2​ @ 1503 ms
​Current position is 0 -3​ @ 1604 ms
​Current position is 0 -4​ @ 1706 ms

✔️ Then the Mars Rover should report an obstacle at 0,-5

Step log

​knownObstacles​ ​[[0,-5]]​ @ 1719 ms