public override ITypeMappingConfigurator <TDeclaringType> Include <TPropertyType>(string name, Func < IPropertyOptionsBuilder <TDeclaringType, TPropertyType>, IPropertyOptionsBuilder <TDeclaringType, TPropertyType> > options) { if (name == null) { throw new ArgumentNullException(nameof(name)); } var propInfo = VirtualPropertyInfo.Create(name, typeof(TDeclaringType), this.owner.DeclaringType, typeof(TPropertyType), PropertyAttributes.None, true, false); this.owner.VirtualProperties.Add(propInfo); return(Include(propInfo, options, propInfo.PropertyType)); }
public void VirtualPropertyInfoHasCorrectPropertyType() { var propertyInfo = new VirtualPropertyInfo("MyProperty", typeof(int)); Assert.AreEqual(typeof(int), propertyInfo.PropertyType); }
public void VirtualPropertyInfoHasCorrectName() { var propertyInfo = new VirtualPropertyInfo("MyProperty", typeof(int)); Assert.AreEqual("MyProperty", propertyInfo.Name); }