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

            marsRover.GoForward();

            Assert.Equal(new Point(xExpected, yExpected), marsRover.Point);
        }
Exemplo n.º 2
0
        public void Should_Move_Forward_When_Seeing_Specific_Direction(int x, int y, Direction direction, int xExpected, int yExpected)
        {
            MarsRover marsRover = new MarsRover(x, y, direction);

            marsRover.GoForward();

            Assert.Equal(new Point(xExpected, yExpected), marsRover.Point);
        }
Exemplo n.º 3
0
        public void Should_Move_Forward_When_Out_Of_The_World_With_Obstacle()
        {
            List <Point> obstacles = new List <Point>()
            {
                new Point(0, -200)
            };

            MarsRover marsRover = new MarsRover(0, 200, Direction.North, obstacles);

            marsRover.GoForward();

            Assert.Equal(new Point(0, 200), marsRover.Point);
        }
Exemplo n.º 4
0
        public void Should_Dont_Move_Forward_When_Obstacle()
        {
            List <Point> obstacles = new List <Point>()
            {
                new Point(0, 1)
            };

            MarsRover marsRover = new MarsRover(0, 0, Direction.North, obstacles);

            marsRover.GoForward();

            Assert.Equal(new Point(0, 0), marsRover.Point);
        }