public void GetCustomAttributeData() { var customAttributes = new[] { CustomAttributeDeclarationObjectMother.Create() }; var property = CustomPropertyInfoObjectMother.Create(customAttributes: customAttributes); var propertyInstantiation = new PropertyOnTypeInstantiation(_declaringType, property, _getMethod, _setMethod); Assert.That(propertyInstantiation.GetCustomAttributeData(), Is.EqualTo(customAttributes)); }
public void SetUp() { _indexParameter = CustomParameterInfoObjectMother.Create(); _declaringType = TypeInstantiationObjectMother.Create(); _getMethod = MethodOnTypeInstantiationObjectMother.Create(_declaringType, typeof(GenericType <>).GetMethod("get_Item")); _setMethod = MethodOnTypeInstantiationObjectMother.Create(_declaringType, typeof(GenericType <>).GetMethod("set_Item")); _originalProperty = CustomPropertyInfoObjectMother.Create( indexParameters: new[] { _indexParameter }, getMethod: _getMethod, setMethod: _setMethod); _property = new PropertyOnTypeInstantiation(_declaringType, _originalProperty, _getMethod, _setMethod); }