public void DomainEventsAreClearedTest()
        {
            var dut          = new TestableEntityBase();
            var domainEvent1 = new Mock <INotification>();

            dut.AddDomainEvent(domainEvent1.Object);
            var domainEvent2 = new Mock <INotification>();

            dut.AddDomainEvent(domainEvent2.Object);

            dut.ClearDomainEvents();

            Assert.AreEqual(0, dut.DomainEvents.Count);
        }
        public void DomainEventIsAddedToListTest()
        {
            var dut         = new TestableEntityBase();
            var domainEvent = new Mock <INotification>();

            dut.AddDomainEvent(domainEvent.Object);

            Assert.IsTrue(dut.DomainEvents.Contains(domainEvent.Object));
        }
        public void DomainEventIsRemovedFromListTest()
        {
            var dut         = new TestableEntityBase();
            var domainEvent = new Mock <INotification>();

            dut.AddDomainEvent(domainEvent.Object);
            dut.RemoveDomainEvent(domainEvent.Object);

            Assert.IsFalse(dut.DomainEvents.Contains(domainEvent.Object));
        }