Exemplo n.º 1
0
        public void MarsRover_FacingWest_MoveForward_MovesToCorrectPosition_And_StaysWithinGrid(
            int currentX, int currentY, int finalX)
        {
            IDirection direction = new West();
            Grid       grid      = new Grid(new Coordinates(0, 0), new Coordinates(5, 5));
            MarsRover  marsRover =
                new MarsRover(direction, new Coordinates(currentX, currentY), grid);

            marsRover.MoveFoward();
            Assert.AreEqual(marsRover.CurrentPosition.XCoordinate, finalX);
            Assert.AreEqual(marsRover.CurrentPosition.YCoordinate, currentY);
        }