public void TurnRightTest() { ToyRobotTurningService turningService = new ToyRobotTurningService(); Robot robot = new Robot(); Position position = new Position(3, 1); Facing facing = Facing.NORTH; robot.Position = position; robot.Facing = facing; turningService.TurnRight(robot); Assert.AreEqual(Facing.EAST, robot.Facing); turningService.TurnRight(robot); Assert.AreEqual(Facing.SOUTH, robot.Facing); turningService.TurnRight(robot); Assert.AreEqual(Facing.WEST, robot.Facing); turningService.TurnRight(robot); Assert.AreEqual(Facing.NORTH, robot.Facing); Assert.AreEqual(3, robot.Position.X); Assert.AreEqual(1, robot.Position.Y); }
public void TurnRightTest_ArgumentException() { ToyRobotTurningService turningService = new ToyRobotTurningService(); Robot robot = new Robot(); turningService.TurnRight(robot); }