public void Rover_Should_Look_S_After_2xRotate_Right() { // Arrange var myRover = new RoverVehicle(); // Act myRover.Rotate(RotationDirection.R); myRover.Rotate(RotationDirection.R); // Assert Assert.Equal("S", myRover.Rotation.GetDirection()); Assert.Equal(180, myRover.Rotation.Degree); }
public void Rover_Should_Look_W_After_Rotate_Left() { // Arrange var myRover = new RoverVehicle(); // Act myRover.Rotate(RotationDirection.L); // Assert Assert.Equal("W", myRover.Rotation.GetDirection()); Assert.Equal(-90, myRover.Rotation.Degree); }
public void Rover_Should_Move_East_Once() { // Arrange var myRover = new RoverVehicle(); // Act myRover.Rotate(RotationDirection.R); myRover.Move(); // Assert Assert.Equal("E", myRover.Rotation.GetDirection()); Assert.Equal(90, myRover.Rotation.Degree); Assert.Equal(1, myRover.Coordinate.X); Assert.Equal($"{myRover.Name} - 1 0 E", myRover.ToString()); }