public void DataContainerWithNoRelation() { var container = TestDataContainerObjectMother.CreateClassWithAllDataTypes1DataContainer(); _relationEndPointManager.RegisterEndPointsForDataContainer(container); Assert.That(_relationEndPointManager.RelationEndPoints.Count, Is.EqualTo(0)); }
public void RegisterEndPointsForDataContainer_Existing_RegistersRealObjectEndPoints() { var endPointID = RelationEndPointObjectMother.CreateRelationEndPointID(DomainObjectIDs.OrderTicket1, "Order"); var dataContainer = RelationEndPointTestHelper.CreateExistingForeignKeyDataContainer(endPointID, DomainObjectIDs.Order3); var foreignKeyProperty = GetPropertyDefinition(typeof(OrderTicket), "Order"); _relationEndPointManager.RegisterEndPointsForDataContainer(dataContainer); var endPoint = (RealObjectEndPoint)_relationEndPointManager.RelationEndPoints[endPointID]; Assert.That(endPoint, Is.Not.Null); Assert.That(endPoint.PropertyDefinition, Is.EqualTo(foreignKeyProperty)); Assert.That(endPoint.OppositeObjectID, Is.EqualTo(DomainObjectIDs.Order3)); }