public void Impermissible_Command_Sequence_Causes_Fall_Off_Plateau(string command) { RobotRover robot = new RobotRover(); Plateau plateau = new Plateau(30, 40); robot.SetPosition(10, 10, "N"); var exception = Assert.Throws <Exception>(() => robot.Move(command, plateau)); Assert.AreEqual(exception.Message, "Command sequence causes robot to fall of plateau"); }
public void Valid_Command_Sequence_Movement_Is_Successful(string command) { RobotRover robot = new RobotRover(); Plateau plateau = new Plateau(30, 40); robot.SetPosition(10, 10, "N"); robot.Move(command, plateau); Assert.AreEqual(13, robot.XCoordinates); Assert.AreEqual(8, robot.YCoordinates); Assert.AreEqual(Direction.N, robot.Direction); }