public void AggregateShouldHaveNoPendingChangesWhenLoadedFromHistory() { var events = new List <IDomainEvent>(); events.Add(new TestAggregateCreatedEvent(Guid.NewGuid(), typeof(TestAggregate), String.Empty)); var aggregate = new TestAggregate(); aggregate.LoadFromHistory(events); aggregate.HasPendingChanges().Should().Be(false); }
public void AggregateShouldHaveTheCorrectValuesWhenLoadedFromHistory() { var guid = Guid.NewGuid(); var events = new List <IDomainEvent>(); events.Add(new TestAggregateCreatedEvent(guid, typeof(TestAggregate), String.Empty)); var aggregate = new TestAggregate(); aggregate.LoadFromHistory(events); aggregate.Id.Should().Be(guid); }