Пример #1
0
        public void ThenTheProcessingEntryContainsTheTimestamp()
        {
            var expectedTimestamp = DateTime.UtcNow;

            ApplicationDateTime.UtcNow = () => expectedTimestamp;
            var filePath = GivenAFile();

            WhenTheFileIsSaved(filePath);

            _eventQueue
            .OfType <FileChangedEvent>()
            .Single()
            .Timestamp
            .Should()
            .Be(ApplicationDateTime.UtcNow());
        }
Пример #2
0
 protected Event()
 {
     Timestamp = ApplicationDateTime.UtcNow();
 }