Beispiel #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)));
        }
Beispiel #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)));
        }