Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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));
        }