Exemplo n.º 1
0
        public void Should_SecondRoverInMars_Success_Result()
        {
            //Given
            Plateau plateauTwo  = new Plateau(new Position(5, 5));
            Rover   secondRover = new Rover(plateauTwo, new Position(3, 3), Direction.E);

            // Act
            secondRover.Run("MMRMMRMRRM");

            //Assert
            Assert.Equal("5 1 E", secondRover.LastRoverPosition());
        }
Exemplo n.º 2
0
        public void Should_FirstRoverInMars_Success_Result()
        {
            //Given
            Plateau plateauOne = new Plateau(new Position(5, 5));
            Rover   firstRover = new Rover(plateauOne, new Position(1, 2), Direction.N);

            // Act
            firstRover.Run("LMLMLMLMM");

            //Assert
            Assert.Equal("1 3 N", firstRover.LastRoverPosition());
        }
Exemplo n.º 3
0
        public void Should_TwoRoverInMars_Success_Result()
        {
            //Given
            Plateau plateau     = new Plateau(new Position(5, 5));
            Rover   firstRover  = new Rover(plateau, new Position(1, 2), Direction.N);
            Rover   secondRover = new Rover(plateau, new Position(3, 3), Direction.E);

            // Act
            firstRover.Run("LMLMLMLMM");
            secondRover.Run("MMRMMRMRRM");

            //Assert
            Assert.Equal("1 3 N", firstRover.LastRoverPosition());
            Assert.Equal("5 1 E", secondRover.LastRoverPosition());
        }