public void ThenTheProcessingEntryContainsTheTimestamp() { var expectedTimestamp = DateTime.UtcNow; ApplicationDateTime.UtcNow = () => expectedTimestamp; var filePath = GivenAFile(); WhenTheFileIsSaved(filePath); _eventQueue .OfType <FileChangedEvent>() .Single() .Timestamp .Should() .Be(ApplicationDateTime.UtcNow()); }
protected Event() { Timestamp = ApplicationDateTime.UtcNow(); }