예제 #1
0
        public static void SpecifyCustomInitialDateTime(DateTime customDateTime)
        {
            var testClock = new TestClock(customDateTime);

            testClock.InitialTime.Should().Be(customDateTime);
            testClock.GetTime().Should().Be(customDateTime);
        }
예제 #2
0
        public static void DefaultTimeIsSetToUtcNow()
        {
            var testClock = new TestClock();

            var utcNow = DateTime.UtcNow;

            testClock.InitialTime.Should().BeCloseTo(utcNow);
            testClock.GetTime().Should().BeCloseTo(utcNow);
        }