private DomainEventStreamMessage CreateMessage(IAggregateRoot aggregateRoot)
 {
     return(new DomainEventStreamMessage(
                ObjectId.GenerateNewStringId(),
                aggregateRoot.UniqueId,
                aggregateRoot.Version + 1,
                aggregateRoot.GetType().FullName,
                aggregateRoot.GetChanges(),
                new Dictionary <string, string>()));
 }
예제 #2
0
 private DomainEventStreamMessage CreateMessage(IAggregateRoot aggregateRoot)
 {
     return new DomainEventStreamMessage(
         ObjectId.GenerateNewStringId(),
         aggregateRoot.UniqueId,
         aggregateRoot.Version + 1,
         aggregateRoot.GetType().FullName,
         aggregateRoot.GetChanges(),
         new Dictionary<string, string>());
 }
예제 #3
0
 public static void ShouldPublishDomainEvents <T>(this IAggregateRoot <T> aggregate, params object[] events)
 {
     new CompareLogic().Compare(aggregate.GetChanges().ToArray(), events).AreEqual.Should().Be(true);
 }