public void OnParsing_OptionIsUnknown_ReturnsIgnoredAndDoesNotChangeSettings(params string[] linePieces) { var configLine = new ConfigLine(linePieces); var uut = new DockingManagerSettingsProvider(); var settings = uut.Settings; var result = uut.OnParsing(configLine); result.IsIgnored.ShouldBeTrue(); uut.Settings.ShouldBe(settings); }
public void OnParsing_ParamsAreInvalid_ReturnsErrorAndDoesNotChangeSettings(params string[] linePieces) { var configLine = new ConfigLine(linePieces); var uut = new DockingManagerSettingsProvider(); var settings = uut.Settings; var result = uut.OnParsing(configLine); result.IsError.ShouldBeTrue(); result.Error.ShouldContain(linePieces[0]); uut.Settings.ShouldBe(settings); }
public void OnParsing_ParamsAreValidForIgnoreThrusters_ReturnsSuccessAndSetsIgnoreThrusters(params string[] linePieces) { var configLine = new ConfigLine(linePieces); var uut = new DockingManagerSettingsProvider(); var settings = uut.Settings; settings.IgnoreThrusters = true; var result = uut.OnParsing(configLine); result.IsSuccess.ShouldBeTrue(); uut.Settings.ShouldBe(settings); }