public void Can_get_association_set_mappings() { var entityContainerMapping = new StorageEntityContainerMapping(new EntityContainer()); Assert.Empty(entityContainerMapping.AssociationSetMappings); var associationSetMapping = new StorageAssociationSetMapping( new AssociationSet("AS", new AssociationType()), entityContainerMapping); entityContainerMapping.AddAssociationSetMapping(associationSetMapping); Assert.Same(associationSetMapping, entityContainerMapping.AssociationSetMappings.Single()); }
public void Can_get_association_set_mappings() { var entityContainerMapping = new StorageEntityContainerMapping(new EntityContainer("C", DataSpace.CSpace)); Assert.Empty(entityContainerMapping.AssociationSetMappings); Assert.Empty(entityContainerMapping.RelationshipSetMaps); var associationSetMapping = new StorageAssociationSetMapping( new AssociationSet("AS", new AssociationType("A", XmlConstants.ModelNamespace_3, false, DataSpace.CSpace)), entityContainerMapping); entityContainerMapping.AddAssociationSetMapping(associationSetMapping); Assert.Same(associationSetMapping, entityContainerMapping.AssociationSetMappings.Single()); Assert.Same(associationSetMapping, entityContainerMapping.RelationshipSetMaps.Single()); }