public void GetCustomAttributeData() { var customAttributes = new[] { CustomAttributeDeclarationObjectMother.Create() }; var evt = CustomEventInfoObjectMother.Create(customAttributes: customAttributes); var evtInstantiation = new EventOnTypeInstantiation(_declaringType, evt, _addMethod, _removeMethod, _raiseMethod); Assert.That(evtInstantiation.GetCustomAttributeData(), Is.EqualTo(customAttributes)); }
public void SetUp() { _declaringType = TypeInstantiationObjectMother.Create(); _originalEvent = GetType().GetEvent("Event"); _addMethod = MethodOnTypeInstantiationObjectMother.Create(_declaringType, GetType().GetMethod("add_Event")); _removeMethod = MethodOnTypeInstantiationObjectMother.Create(_declaringType, GetType().GetMethod("remove_Event")); _raiseMethod = MethodOnTypeInstantiationObjectMother.Create(_declaringType, GetType().GetMethod("RaiseMethod")); _event = new EventOnTypeInstantiation(_declaringType, _originalEvent, _addMethod, _removeMethod, _raiseMethod); }