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)); }