Exemple #1
0
        public void Rover_WhenMoveForward_ThenMovedForward()
        {
            //Given
            ILocation location = new Location(_defaultMarsArea, _defaultRoverLocation);
            IRover    rover    = new Rover(new NorthState(), location);

            //When
            rover.MoveForward();

            //Then
            RoverLocation expectedRoverLocation = new RoverLocation()
            {
                CurrentXaxis = 2, CurrentYaxis = 3
            };

            rover.GetLocation().GetRoverLocation().Should().BeEquivalentTo(expectedRoverLocation);
        }