public void TurnLeftTest() { 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.TurnLeft(robot); Assert.AreEqual(Facing.WEST, robot.Facing); turningService.TurnLeft(robot); Assert.AreEqual(Facing.SOUTH, robot.Facing); turningService.TurnLeft(robot); Assert.AreEqual(Facing.EAST, robot.Facing); turningService.TurnLeft(robot); Assert.AreEqual(Facing.NORTH, robot.Facing); Assert.AreEqual(3, robot.Position.X); Assert.AreEqual(1, robot.Position.Y); }
public void TurnLeftTest_ArgumentException() { ToyRobotTurningService turningService = new ToyRobotTurningService(); Robot robot = new Robot(); turningService.TurnLeft(robot); }