public void RoverCanMoveForwardFourSpaces() { Rover r = new Rover(); // default coords and direction char[] commands = { 'F', 'F', 'F', 'F' }; r.StoreCommands(commands); r.ProcessAllCommands(); // Should move forward 4 spots RoverCoordinates dest = new RoverCoordinates(0, 4); Assert.True(dest.Equals(r.Coordinates)); }
public void RoverCanNavigateInASquare() { Rover r = new Rover(); // default coords and direction char[] commands = { 'F', 'L', 'F', 'L', 'F', 'F', 'L', 'F', 'F', 'L', 'F', 'L', 'F' }; r.StoreCommands(commands); r.ProcessAllCommands(); // Should end back at the starting point RoverCoordinates dest = new RoverCoordinates(0, 0); Assert.True(dest.Equals(r.Coordinates)); }