public void WithTimeout_correctly_sets_Timeout_property(TimeSpan timeout) { var sut = new ProcessOptionsBuilder(); ProcessOptions actual = sut.WithTimeout(timeout).Build(); actual.Timeout.Should().Be(timeout); }
public void WithTimeout_returns_self(TimeSpan timeout) { var sut = new ProcessOptionsBuilder(); ProcessOptionsBuilder actual = sut.WithTimeout(timeout); actual.Should().BeSameAs(sut); }
public void WithTimeout_has_guard_for_timeout_range( [Range(301, int.MaxValue)] int seconds) { var timeout = TimeSpan.FromSeconds(seconds); var sut = new ProcessOptionsBuilder(); Action action = () => sut.WithTimeout(timeout); action.Should().Throw <ArgumentOutOfRangeException>(); }