Exemplo n.º 1
0
        public void ClearsEventsFromAggregateOnceCommitted()
        {
            var aggregateToSave = new TestWoftamAggregate(Guid.NewGuid());

            aggregateToSave.ProduceEvents(10);
            _repo.Save(aggregateToSave, Guid.NewGuid(), d => { });

            Assert.Equal(0, ((IAggregate)aggregateToSave).GetUncommittedEvents().Count);
        }