public void IsSelfReferencing_returns_true_when_source_type_matches_target_type() { var associationType = new EdmAssociationType().Initialize(); associationType.SourceEnd.EntityType = associationType.TargetEnd.EntityType = new EdmEntityType(); Assert.True(associationType.IsSelfReferencing()); }
public void IsSelfReferencing_returns_true_when_ends_have_same_base_type() { var associationType = new EdmAssociationType().Initialize(); associationType.SourceEnd.EntityType = new EdmEntityType(); associationType.TargetEnd.EntityType = new EdmEntityType(); Assert.False(associationType.IsSelfReferencing()); associationType.SourceEnd.EntityType.BaseType = associationType.TargetEnd.EntityType.BaseType = new EdmEntityType(); Assert.True(associationType.IsSelfReferencing()); }