Exemplo n.º 1
0
        public async Task At_1100_DoesNotLog()
        {
            var collector = new TestAsyncCollector <LogDocument>();
            var result    = await NightlyLog.RunAsync("hi", collector, new FixDateTimeResolver(new DateTime(2000, 1, 1, 6, 0, 0, DateTimeKind.Utc)), NullLogger.Instance);

            Assert.Empty(collector);
        }
Exemplo n.º 2
0
        public async Task At_0300_DoesLog()
        {
            var collector = new TestAsyncCollector <LogDocument>();
            var result    = await NightlyLog.RunAsync("hi", collector, new FixDateTimeResolver(new DateTime(2000, 1, 1, 3, 0, 0, DateTimeKind.Utc)), NullLogger.Instance);

            Assert.Single(collector);
            Assert.Equal("hi", collector.First().Log);
        }