public void InvariantBreaksOnOutOfRangeMinute(int minute) { var stopwatch = new Stopwatch(); stopwatch.Invariant.Should().BeTrue(); stopwatch.AddMinutes(minute); stopwatch.Invariant.Should().BeFalse(); }
public void AddMinutesAddsMinute(int minute, int expectedHour, int expectedMinute) { var stopwatch = new Stopwatch(); stopwatch.Hour.Should().Be(0); stopwatch.Minute.Should().Be(0); stopwatch.Second.Should().Be(0); stopwatch.Invariant.Should().BeTrue(); stopwatch.AddMinutes(minute); stopwatch.Invariant.Should().BeTrue(); stopwatch.Hour.Should().Be(expectedHour); stopwatch.Minute.Should().Be(expectedMinute); stopwatch.Second.Should().Be(0); }