public void GetRowVersion_ShouldReturnLastSetRowVersion() { var dut = new TestableEntityBase(); Assert.IsNotNull(dut.RowVersion); dut.SetRowVersion(RowVersion); Assert.IsTrue(dut.RowVersion.SequenceEqual(ConvertedRowVersion)); }
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)); }
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 ReturningEmptyDomainEventsListTest() { var dut = new TestableEntityBase(); Assert.IsNotNull(dut.DomainEvents); }