public void AggregateRoot_Calls_Event_Handlers_By_Convention() { var root = new TestDomain(SequentialGuid.NewId()); root.Modify(); Assert.That(root.OnSomethingHappenedCalled); Assert.That(root.ApplySomethingElseHappenedCalled); }
public void AggregateRoot_Increments_Version_For_Each_Applied_Event() { var root = new TestDomain(SequentialGuid.NewId()); root.Modify(); Assert.AreEqual(3, root.Version); Assert.AreEqual(3, root.AppliedEvents.Count); }