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