public void Cloning_an_foreign_key_mapping_configuration_clones_its_table_and_column_information() { var configuration = new ForeignKeyAssociationMappingConfiguration(); configuration.MapKey("C1"); configuration.ToTable("T", "S"); var clone = (ForeignKeyAssociationMappingConfiguration)configuration.Clone(); Assert.Equal(configuration, clone); configuration.MapKey("C2"); Assert.NotEqual(configuration, clone); }
public void Cloning_an_foreign_key_mapping_configuration_clones_its_annotation_information() { var configuration = new ForeignKeyAssociationMappingConfiguration(); configuration.MapKey("C1", "C2"); configuration.HasColumnAnnotation("C1", "A1", "V1"); configuration.HasColumnAnnotation("C2", "A2", "V2"); var clone = (ForeignKeyAssociationMappingConfiguration)configuration.Clone(); Assert.Equal(configuration, clone); configuration.HasColumnAnnotation("C2", "A2", "V3"); Assert.NotEqual(configuration, clone); }