public void OnParsing_OptionIsUnknown_ReturnsIgnoredAndDoesNotChangeSettings(params string[] linePieces) { var configLine = new ConfigLine(linePieces); var uut = new ProgramSettingsProvider(); 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 ProgramSettingsProvider(); var settings = uut.Settings; var result = uut.OnParsing(configLine); result.IsError.ShouldBeTrue(); result.Error.ShouldContain(configLine.Option); uut.Settings.ShouldBe(settings); }
public void OnParsing_ParamsAreValidForBlockTag_ReturnsSuccessAndSetsBlockTag(params string[] linePieces) { var configLine = new ConfigLine(linePieces); var uut = new ProgramSettingsProvider(); var settings = uut.Settings; settings.ManageInterval = TimeSpan.FromMilliseconds(int.Parse(configLine.GetParam(0))); var result = uut.OnParsing(configLine); result.IsSuccess.ShouldBeTrue(); uut.Settings.ShouldBe(settings); }