public void TryGetProperty_should_filter_on_property_type_polymorphic() { var pp = new ReflectionPropertyProvider(new A()); object actual; Assert.True(pp.TryGetProperty("D", typeof(object), out actual)); Assert.True(pp.TryGetProperty("D", typeof(L), out actual)); Assert.True(pp.TryGetProperty("D", typeof(N), out actual)); Assert.False(pp.TryGetProperty("D", typeof(O), out actual)); }
public void TryGetProperty_should_filter_on_property_type() { var pp = new ReflectionPropertyProvider(new A()); object actual; Assert.False(pp.TryGetProperty("B", typeof(int), out actual)); }
public void TryGetProperty_should_apply_to_nulls() { var pp = new ReflectionPropertyProvider(new A()); object actual; Assert.True(pp.TryGetProperty("C", typeof(string), out actual)); Assert.Null(actual); }