public void EmitEvents() { var aggregate = new TestAggregate(); aggregate.TestMethod(); Assert.AreEqual(1, aggregate.Events.Count()); aggregate.TestMethod(); Assert.AreEqual(2, aggregate.Events.Count()); }
public void CallEventApplicatorAndEmitEvent() { var aggregate = new TestAggregate(1, 1); aggregate.TestMethod(); Assert.AreEqual(1, aggregate.Events.Count()); Assert.IsInstanceOfType(aggregate.Events.First(), typeof(TestEvent)); Assert.AreEqual(1, aggregate.InvokeCount); }