public void Given_Out_Of_Bounds_Distance_To_Start_Rover_To_Catch_Exception(string commands) { ILwRoverService rowerService = new LwRoverService(); rowerService.SetInitialPosition(); Assert.Throws <OutOfBoundsException>(() => rowerService.UpdatePosition(commands)); }
public void Given_Left_Left_Left_Left_To_Rover_To_Bring_to_current_Direction(string commands) { ILwRoverService rowerService = new LwRoverService(); rowerService.SetInitialPosition(); rowerService.UpdatePosition(commands); var currentPosition = rowerService.GetPosition(); Assert.Equal(currentPosition.CurrentDirection, Directions.South); }
public void Given_Max_5_Commands_To_Rover(string commands) { ILwRoverService rowerService = new LwRoverService(); rowerService.SetInitialPosition(); rowerService.UpdatePosition(commands); var currentPosition = rowerService.GetPosition(); Assert.Equal(currentPosition.CurrentDirection, Directions.North); Assert.Equal(currentPosition.XPosition, 24); Assert.Equal(currentPosition.GridNumber, 4624); }