public void ObeysColumnAttributeRemap() { var processor = new MappedPropertiesProcessor(); var classMap = new BsonClassMap <ColumnAttributePropertyModel>(); classMap.AutoMap(); processor.ApplyMapping(typeof(ColumnAttributePropertyModel), classMap); var entityMapper = new EntityMapper <ColumnAttributePropertyModel>(); var mappedProperties = entityMapper.GetEntityMapping(); Assert.IsTrue(mappedProperties.Any(p => p.ElementName == "CustomPropertyName")); }
public void ObeysNotMappedAttribute() { var processor = new MappedPropertiesProcessor(); var classMap = new BsonClassMap <NotMappedPropertiesModel>(); classMap.AutoMap(); processor.ApplyMapping(typeof(NotMappedPropertiesModel), classMap); var entityMapper = new EntityMapper <NotMappedPropertiesModel>(); var mappedProperties = entityMapper.GetEntityMapping(); Assert.IsFalse(mappedProperties.Any(p => p.ElementName == "NotMapped")); }