public void Can_get_and_set_configuration_facet() { var navigationProperty = new NavigationProperty("N", TypeUsage.Create(new EntityType("E", "N", DataSpace.CSpace))); navigationProperty.SetConfiguration(42); Assert.Equal(42, navigationProperty.GetConfiguration()); }
public void Configure_should_set_configuration_annotations() { var navigationPropertyConfiguration = new NavigationPropertyConfiguration(new MockPropertyInfo()); var navigationProperty = new NavigationProperty("N", TypeUsage.Create(new EntityType())) { RelationshipType = new AssociationType() }; navigationProperty.Association.SourceEnd = new AssociationEndMember("S", new EntityType()); navigationProperty.Association.TargetEnd = new AssociationEndMember("T", new EntityType()); navigationPropertyConfiguration.Configure(navigationProperty, new EdmModel(), new EntityTypeConfiguration(typeof(object))); Assert.NotNull(navigationProperty.GetConfiguration()); Assert.NotNull(navigationProperty.Association.GetConfiguration()); }
public void Configure_should_set_configuration_annotations() { var navigationPropertyConfiguration = new NavigationPropertyConfiguration(new MockPropertyInfo(typeof(AType1), "N")); var navigationProperty = new NavigationProperty("N", TypeUsage.Create(new EntityType("E", "N", DataSpace.CSpace))) { RelationshipType = new AssociationType("A", XmlConstants.ModelNamespace_3, false, DataSpace.CSpace) }; navigationProperty.Association.SourceEnd = new AssociationEndMember("S", new EntityType("E", "N", DataSpace.CSpace)); navigationProperty.Association.TargetEnd = new AssociationEndMember("T", new EntityType("E", "N", DataSpace.CSpace)); navigationPropertyConfiguration.Configure( navigationProperty, new EdmModel(DataSpace.CSpace), new EntityTypeConfiguration(typeof(object))); Assert.NotNull(navigationProperty.GetConfiguration()); Assert.NotNull(navigationProperty.Association.GetConfiguration()); }