public void InterfaceProperty() { PropertyInfo property = null; IPropertyClass proxy = new InterfacePropertyClass(new InvocationHandler(invocation => { property = invocation.Property; return Task.FromResult<object>(null); })); proxy.Property = "foo"; Assert.AreEqual(nameof(IPropertyClass.Property), property.Name.Split('.').Last()); }
public void InterfaceProperty() { PropertyInfo property = null; IPropertyClass proxy = new InterfacePropertyClass(new InvocationHandler(invocation => { property = invocation.Property; return(Task.FromResult <object>(null)); })); proxy.Property = "foo"; Assert.AreEqual(nameof(IPropertyClass.Property), property.Name.Split('.').Last()); }