Exemplo n.º 1
0
        public void Should_Move_Correctly_With_Command_Without_Obstacle(string command, int x, int y, Direction direction, int xExpected, int yExpected)
        {
            MarsRover marsRover = new MarsRover(x, y, direction);

            marsRover.ExecuteCommand(command);

            Assert.Equal(new Point(xExpected, yExpected), marsRover.Point);
        }
Exemplo n.º 2
0
        public void Should_Move_Correctly_With_Command_With_Obstacle(string command, int x, int y, Direction direction, int xExpected, int yExpected)
        {
            List <Point> obstacles = new List <Point>()
            {
                new Point(1, 1),
                new Point(0, -1),
            };

            MarsRover marsRover = new MarsRover(x, y, direction, obstacles);

            marsRover.ExecuteCommand(command);

            Assert.Equal(new Point(xExpected, yExpected), marsRover.Point);
        }