public void Should_find_property_based_on_setter_method_and_argument() { PropertyInfo propertyInfo = typeof(SomeClass).GetProperty("SetterOnly"); Assert.That(PropertyReflector <SomeClass> .FromSetter <long>((c, arg) => c.SetterOnly = arg), Is.EqualTo(propertyInfo)); }
public void Should_find_property_based_on_setter_method() { PropertyInfo propertyInfo = typeof(SomeClass).GetProperty("SetterOnly"); Assert.That(PropertyReflector <SomeClass> .FromSetter(c => c.SetterOnly = 0), Is.EqualTo(propertyInfo)); }