public void TestClock_can_be_set_to_set_time(TestClock sut, DateTimeOffset pointInTime) { sut.SetTo(pointInTime); Assert.That(sut.UtcNow, Is.EqualTo(pointInTime.ToUniversalTime())); }
public void TestClock_can_be_advanced_by_specified_time_interval([Frozen] DateTimeOffset pointInTime, TestClock sut, TimeSpan advanceBy) { sut.AdvanceBy(advanceBy); Assert.That(sut.UtcNow, Is.EqualTo(pointInTime.ToUniversalTime() + advanceBy)); }
public void Initialize() { _testClock = new TestClock(Now); }
public void TestClock_can_be_initialized_with_set_time([Frozen] DateTimeOffset pointInTime, TestClock sut) { Assert.That(sut.UtcNow, Is.EqualTo(pointInTime.ToUniversalTime())); }
public void Initialize() { _testClock = new TestClock(Now); _resetTime = Now.AddHours(-1); }