public static void SpecifyCustomInitialDateTime(DateTime customDateTime) { var testClock = new TestClock(customDateTime); testClock.InitialTime.Should().Be(customDateTime); testClock.GetTime().Should().Be(customDateTime); }
public static void DefaultTimeIsSetToUtcNow() { var testClock = new TestClock(); var utcNow = DateTime.UtcNow; testClock.InitialTime.Should().BeCloseTo(utcNow); testClock.GetTime().Should().BeCloseTo(utcNow); }