System.Reflection.Tests.PropertyInfoTests.GetValue C# (CSharp) Method

GetValue() private method

private GetValue ( Type type, string name, object obj, object index, object expected ) : void
type Type
name string
obj object
index object
expected object
return void
        public void GetValue(Type type, string name, object obj, object[] index, object expected)
        {
            PropertyInfo propertyInfo = GetProperty(type, name);
            if (index == null)
            {
                Assert.Equal(expected, propertyInfo.GetValue(obj));
            }
            Assert.Equal(expected, propertyInfo.GetValue(obj, index));
        }