public void Move_Should_Throw_If_Outbounded(double x, double y, Facing facing) { var currentLocation = new Location(new Position(x, y), facing); var plateau = new Plateau(5, 5); var mover = new RoverMover(); Assert.Throws <MoveException>(() => mover.Move(currentLocation, plateau)); }
public void Move_Should_Move_Position(double x, double y, Facing facing, double targetX, double targetY) { var currentLocation = new Location(new Position(x, y), facing); var plateau = new Plateau(5, 5); var mover = new RoverMover(); var targetPosition = mover.Move(currentLocation, plateau); Assert.Equal(targetX, targetPosition.X); Assert.Equal(targetY, targetPosition.Y); }