Ejemplo n.º 1
0
        public static void SpecifyCustomInitialDateTime(DateTime customDateTime)
        {
            var testClock = new TestClock(customDateTime);

            testClock.InitialTime.Should().Be(customDateTime);
            testClock.GetTime().Should().Be(customDateTime);
        }
Ejemplo n.º 2
0
        public static void DefaultTimeIsSetToUtcNow()
        {
            var testClock = new TestClock();

            var utcNow = DateTime.UtcNow;

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