Exemple #1
0
        public void Cannot_see_events_published_before_journal_creation()
        {
            var source = new EventJournalSource();

            source.Publish(new CommandRequestedEvent(",before1"));
            source.Publish(new CommandRequestedEvent(",before2"));

            var journal = new EventJournal(source);

            source.Publish(new CommandRequestedEvent(",after"));

            journal.Count().Should().Be(1, "1 event was added to event source before journal creation");
            journal.Single().Should().BeOfType <CommandRequestedEvent>()
            .Which.InvocationSyntax.Should().Be(",after");
        }