Skip to content

Commit

Permalink
:(
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiasnordqvist committed Jun 16, 2024
1 parent 3b80f48 commit 3a5a6a6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions DotNetThoughts.TimeKeeping.Tests/TimeTravelersClockTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace DotNetThoughts.TimeKeeping.Tests;
public class TimeTravelersClockTests
{
private static TimeSpan _allowedDeviation = TimeSpan.FromMilliseconds(10);
private static TimeSpan _allowedDeviation = TimeSpan.FromMilliseconds(100);
[Fact]
public void FreezeTime()
{
Expand Down Expand Up @@ -64,7 +64,7 @@ public void BaselineMocksNow()
var baseLine = now.AddDays(-1);
sut.SetBaseline(baseLine);
sut.UtcNow().Should().BeCloseTo(baseLine, _allowedDeviation);
var slept = Sleep(20);
var slept = Sleep(1000);
sut.UtcNow().Should().BeCloseTo(baseLine.Add(slept), _allowedDeviation);
}

Expand Down Expand Up @@ -94,7 +94,7 @@ public void AdvanceFrozenTimeAndThenThaw()
sut.Freeze(frozenTime);
sut.Advance(TimeSpan.FromDays(1));
sut.Thaw();
var slept = Sleep(20);
var slept = Sleep(1000);
sut.UtcNow().Should().BeCloseTo(frozenTime.AddDays(1).Add(slept), _allowedDeviation);
}

Expand All @@ -110,9 +110,9 @@ public void AComplicatedTest()
sut.UtcNow().Should().BeCloseTo(baseLine.Add(timer.Elapsed), _allowedDeviation);
var frozen = sut.Freeze();
sut.UtcNow().Should().Be(frozen);
var sleptWhileFrozen = Sleep(200);
var sleptWhileFrozen = Sleep(2000);
sut.Thaw();
Sleep(20);
Sleep(1000);
sut.UtcNow().Should().BeCloseTo(baseLine.Add(timer.Elapsed).Add(-sleptWhileFrozen), _allowedDeviation);
}

Expand Down

0 comments on commit 3a5a6a6

Please sign in to comment.