示例#1
0
        public void UtcNow_ReturnsProperUtcNow()
        {
            var generator = new ConstantTimeGenerator(new DateTimeOffset(1000, 1, 1, 1, 1, 1, TimeSpan.FromHours(1)));

            Assert.That(generator.UtcNow(), Is.EqualTo(new DateTimeOffset(1000, 1, 1, 0, 1, 1, TimeSpan.Zero)));
        }
示例#2
0
        public void Today_ReturnsProperToday()
        {
            var generator = new ConstantTimeGenerator(new DateTimeOffset(1000, 1, 1, 1, 1, 1, TimeSpan.FromHours(1)));

            Assert.That(generator.Today(), Is.EqualTo(new DateTime(1000, 1, 1)));
        }