public void ChangeDirection() { Rover myRover = new Rover(); myRover.X = 2; myRover.Y = 2; myRover.Direction = Direction.N; myRover.ChangeDirection('L'); Assert.AreEqual(myRover.Direction, Direction.W); myRover.ChangeDirection('R'); Assert.AreEqual(myRover.Direction, Direction.N); }
[Test] // tests to change direction of Rover public void i1_CommandLeft_ChangesDirectionFrom_East_ToNorth() { rover.direction = 'e';// reset direction from above test case's direction string command = "l"; rover.PrintStatus(); rover.ChangeDirection(command); rover.PrintStatus(); char expectedDirection = 'n'; Assert.AreEqual(expectedDirection, rover.direction); }
public void ChangeDirection(char direction) { _rover.ChangeDirection(direction); }
public void ChangeDirection(int directionChange, string expectedDirection) { _rover.ChangeDirection(directionChange); _rover.CurrentDirection.Should().Be(expectedDirection); }