Skip to content

Commit

Permalink
Fix failing test due to timespan precision
Browse files Browse the repository at this point in the history
  • Loading branch information
SSchulze1989 committed Oct 31, 2023
1 parent 005dbd3 commit 58f2e27
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public async Task Calculate_ShouldApplyTeamPenalties(PenaltyType penaltyType)
break;
case PenaltyType.Time:
var interval = TimeSpan.FromSeconds(testTeamRows.Sum(x => x.Interval.TotalSeconds));
testRow.Interval.Should().Be(interval + penalty.Time);
testRow.Interval.Should().BeCloseTo(interval + penalty.Time, TimeSpan.FromSeconds(0.001));
break;
case PenaltyType.Position:
var position = test.ResultRows.OrderBy(x => x.TeamId).ToList().IndexOf(testRow) + 1;
Expand Down

0 comments on commit 58f2e27

Please sign in to comment.