コード例 #1
0
        public void AddDomainEvent()
        {
            var ar = new TestAggregateRoot();

            ar.DomainEvents.ShouldBeEmpty();
            ar.AddDomainEvent(1);
            ar.DomainEvents.ShouldContain(1);
            ar.DomainEvents.ShouldHaveSingleItem();
            ar.ClearDomainEvents();
            ar.DomainEvents.ShouldBeEmpty();
        }