public void RelationReadInReadOnlyMiddleTransaction_WithoutLoading_IsAllowed() { WriteableSubTransaction.EnsureDataComplete(_relationEndPointID); WriteableSubTransaction.EnsureDataAvailable(DomainObjectIDs.Customer1); var customer = ExecuteInReadOnlyMiddleTransaction(() => _order1.Customer); Assert.That(customer.ID, Is.EqualTo(DomainObjectIDs.Customer1)); }
public void RelationReadInReadOnlyMiddleTransaction_IsAllowed_NoLoading() { WriteableSubTransaction.EnsureDataAvailable(DomainObjectIDs.Order1); WriteableSubTransaction.EnsureDataComplete(_relationEndPointID); WriteableSubTransaction.EnsureDataAvailable(DomainObjectIDs.OrderTicket1); var orderTicket = ExecuteInReadOnlyMiddleTransaction(() => _order1.OrderTicket); Assert.That(orderTicket.ID, Is.EqualTo(DomainObjectIDs.OrderTicket1)); }
public void RelationReadInReadOnlyMiddleTransaction_WithoutLoading_IsAllowed() { WriteableSubTransaction.EnsureDataAvailable(DomainObjectIDs.Order1); WriteableSubTransaction.EnsureDataComplete(_relationEndPointID); WriteableSubTransaction.EnsureDataAvailable(DomainObjectIDs.OrderItem1); WriteableSubTransaction.EnsureDataAvailable(DomainObjectIDs.OrderItem2); var orderItems = ExecuteInReadOnlyMiddleTransaction(() => _order1.OrderItems.ToList()); Assert.That(orderItems.Select(oi => oi.ID), Is.EquivalentTo(new[] { DomainObjectIDs.OrderItem1, DomainObjectIDs.OrderItem2 })); }