public void ExecuteCommand_ShouldBeException_GetInvalidCommandException(int width, int height, int pointX, int pointY, Rotation rotation, string command) { var plateau = new Plateau(width, height); var location = new Location(pointX, pointY); var rover = new MarsRover(); rover.SetPlateau(plateau); rover.SetLocation(location, rotation); var roverManager = new MarsRoverManager(rover); Assert.Throws <InvalidCommandException>(() => roverManager.ExecuteCommand(command)); }
public void ExecuteCommand_ShouldBeEquals_GetExpectedResult(int width, int height, int pointX, int pointY, Rotation rotation, string command, string expectedResult) { var plateau = new Plateau(width, height); var location = new Location(pointX, pointY); var _rover = new MarsRover(); _rover.SetPlateau(plateau); _rover.SetLocation(location, rotation); var _roverManager = new MarsRoverManager(_rover); _roverManager.ExecuteCommand(command); Assert.Equal(expectedResult, _roverManager.GetStatusText()); }