コード例 #1
0
        public void ChangingAggregate_EventIssued()
        {
            var sut = new TestAggregate(Guid.NewGuid());

            sut.Count();

            sut.UncommittedEvents.Should().ContainSingle().Subject.Should().BeOfType <TestCounted>();
        }
コード例 #2
0
        public void ClearingEvents_UncommittedEventsIsEmpty()
        {
            var sut = new TestAggregate(Guid.NewGuid());

            sut.Count();

            sut.ClearUncommittedEvents(0);

            sut.UncommittedEvents.Should().BeEmpty();
        }