コード例 #1
0
 public void ShouldNotFail()
 {
     var id = Guid.NewGuid();
     var eventPublisher = new InMemoryEventBus(new MessageRouterStub());
     var eventStore = new RavenEventStore(eventPublisher, "RavenDB");
     eventStore.DeleteCollection();
     var events = new List<IDomainEvent>
                      {
                          new ValidEvent(id),
                          new AnotherValidEvent(id),
                          new ValidEvent(id),
                          new AnotherValidEvent(id)
                      };
     eventStore.InsertBatchTest(events);
     var eventsFromStore = eventStore.GetEventsTest(id);
     foreach (var domainEvent in eventsFromStore)
     {
         events.Should().Contain(domainEvent);
     }
     
 }