public void All_the_included_property_mapping_are_applied() { var typeMapping = new TypeMapping(); var propertyMappings = new List <Mock <IPropertyMapping> >(); var instance = new object(); for (int i = 0; i < 10; i++) { var propertyMapping = new Mock <IPropertyMapping>(); propertyMappings.Add(propertyMapping); typeMapping.Include(propertyMapping.Object); } typeMapping.Apply(instance); for (int i = 0; i < 10; i++) { propertyMappings[i].Verify(pm => pm.Apply(instance), Times.Once); } }
public void All_the_included_property_mappings_are_applied() { var sut = new TypeMapping(); var propertyMappings = new Mock <IPropertyMapping> [10]; var instance = new object(); for (int i = 0; i < propertyMappings.Length; i++) { var propertyMapping = new Mock <IPropertyMapping>(); propertyMappings[i] = (propertyMapping); sut.Include(propertyMapping.Object); } sut.Apply(instance); for (int i = 0; i < propertyMappings.Length; i++) { propertyMappings[i].Verify(pm => pm.Apply(instance), Times.Once); } }