コード例 #1
0
        public void adjust_mock_clock_time(double adjustment)
        {
            var time = new DateTimeOffset(2019, 7, 1, 14, 0, 0, TimeSpan.Zero);

            Clock.Default = new MockClock(time);
            Clock.AsMockClock().Adjust(adjustment);
            Assert.Equal(time.AddMilliseconds(adjustment), Clock.Default.UtcNow);
        }