public void AddAggregate(AggregateRoot aggregate)
 {
     foreach (var domainEvent in aggregate.GetUncommittedEvents())
     {
         var @event = new EventMessage(aggregate.Id, aggregate.Version, domainEvent);
         this._eventMessages.Add(@event);
     }
 }
        public void stream_should_have_all_events_for_aggregate(AggregateRoot aggregate)
        {
            var aggregateEvents = aggregate.GetUncommittedEvents();
            this.Stream.UncommittedEvents.Where(x => x.AggregateId == aggregate.Id)
                .Should()
                .HaveCount(aggregateEvents.Count);

            foreach (var aggregateEvent in aggregateEvents)
            {
                this.Stream.UncommittedEvents.Any(x => x.Body == aggregateEvent).Should().BeTrue();
            }
        }