public void EventWithoutReturnType_DecoratedWithEventActionInterceptionAspectWithNewEventOfOnInvokeThatHasAReturnType_ThrowsAspectTypeMismatchException() { var Event = GetEvent("EventWithoutParams"); var aspect = new EventInterceptionAspectAttribute(typeof(TestInterceptionAspectWithNewEventOfOnInvokeThatHasAReturnType)); AspectTypeValidator.ValidateEventAspect(aspect, Event); }
public void EventWithoutReturn_DecoratedWithOnActionBoundaryAspectWithNewEventOfOnAddHandlerThatHasMoreThenOneArgument_ThrowsAspectTypeMismatchException() { var Event = GetEvent("EventWithoutParams"); var aspect = new EventInterceptionAspectAttribute(typeof(TestEventInterceptionAspectWithNewEventOfOnAddHandlerThatHasMoreThenOneArgument)); AspectTypeValidator.ValidateEventAspect(aspect, Event); }
public void ParameterslessEventWithReturnType_DecoratedWithFunctionAspectThatHasAtLeastOneParameter_ThrowsAspectTypeMismatchException() { var Event = GetEvent("EventWithoutParamsWithBoolReturnType"); var aspect = new EventInterceptionAspectAttribute(typeof(TestAspect)); AspectTypeValidator.ValidateEventAspect(aspect, Event); }
public void Event_DecoratedWithFunctionAspectThatHasNoAdvices_ThrowsAdviceNotFoundException() { var Event = GetEvent("EventWithStringParamAndBoolReturnType"); var aspect = new EventInterceptionAspectAttribute(typeof(NoAdviceAspect)); AspectTypeValidator.ValidateEventAspect(aspect, Event); }
public void EventWithOneParemeterAndReturnType_DecoratedWithEventFunctionAspectThatHasDifferentSetOfParameters_ThrowsAspectTypeMismatchException() { var Event = GetEvent("EventWithStringParamAndBoolReturnType"); var aspect = new EventInterceptionAspectAttribute(typeof(TestAspect4)); AspectTypeValidator.ValidateEventAspect(aspect, Event); }
public void ParameterslessEventAndNoReturnType_DecoratedWithFunctionAspect_ThrowsAspectAnnotationException() { var Event = GetEvent("EventWithoutParams"); var aspect = new EventInterceptionAspectAttribute(typeof(TestAspect)); AspectTypeValidator.ValidateEventAspect(aspect, Event); }
public void EventWithAReturnType_DecoratedWithEventActionAspect_ThrowsAspectTypeMismatchException() { var Event = GetEvent("EventWithStringParamAndBoolReturnType"); var aspect = new EventInterceptionAspectAttribute(typeof(EventAction)); AspectTypeValidator.ValidateEventAspect(aspect, Event); }
public void EventWithoutReturnType_DecoratedWithEventInterceptionAspectAttribute_ThrowsAspectAnnotationException() { var Event = GetEvent("EventWithStringParamAndVoidReturnType"); var aspect = new EventInterceptionAspectAttribute(typeof(TestAspect)); AspectTypeValidator.ValidateEventAspect(aspect, Event); }
public void EventInterceptionAspectAttribute_GivenAnInterceptionAspectTypeAsAnArgument_ThrowsAspectAnnotationException() { var Event = GetEvent("EventWithStringParamAndBoolReturnType"); var aspect = new EventInterceptionAspectAttribute(typeof(TestInterceptionAspect)); AspectTypeValidator.ValidateEventAspect(aspect, Event); }
public void EventWithOneParameterAndNoReturnType_DecoratedWithOnFunctionInterceptionAspectWithOneAReturnTypeThatIsTheSameUnderlyingTypeAsTheParameterOfTheEvent_ThrowsAspectAnnotationException() { var Event = GetEvent("EventWithIntParamAndNoReturnType"); var aspect = new EventInterceptionAspectAttribute(typeof(TestEventFunctionInterceptionAspect)); AspectTypeValidator.ValidateEventAspect(aspect, Event); }
public void MethodWithOneParameterAndNoReturnType_DecoratedWithOnFunctionInterceptionAspectWithOneAReturnTypeThatIsTheSameUnderlyingTypeAsTheParameterOfTheMethod_ThrowsAspectAnnotationException() { var method = GetMethod("MethodWithIntParamAndNoReturnType"); var aspect = new MethodInterceptionAspectAttribute(typeof(TestFunctionInterceptionAspect)); AspectTypeValidator.ValidateMethodAspect(aspect, method); }
public void EventWithStringParamAndBoolReturnType_DecoratedWithMatchedEventInterceptionAspectAttribute_ReturnsNoErrorFromValidation() { var Event = GetEvent("EventWithStringParamAndBoolReturnType"); var aspect = new EventInterceptionAspectAttribute(typeof(TestAspect)); AspectTypeValidator.ValidateEventAspect(aspect, Event); }
public void MethodWithoutReturn_DecoratedWithOnActionBoundaryAspectWithNewMethodOfOnExitThatHasMoreThenOneArgument_ThrowsAspectTypeMismatchException() { var method = GetMethod("MethodWithoutParams"); var aspect = new OnMethodBoundaryAspectAttribute(typeof(TestMethodBounadryAspectAspectWithNewMethodOfOnExitThatHasMoreThenOneArgument)); AspectTypeValidator.ValidateMethodAspect(aspect, method); }
public void MethodWithOneArgumentAndWithoutReturnType_DecoratedWithFunctionAspectThatHasOneArgumentWhichIsTheSameTypeOfTheMethodsArgument_ThrowsAspectTypeMismatchException() { var method = GetMethod("MethodWithIntParamAndNoReturnType"); var aspect = new MethodInterceptionAspectAttribute(typeof(TestFunctionInterceptionAspect)); AspectTypeValidator.ValidateMethodAspect(aspect, method); }
public void MethodWithoutReturnType_DecoratedWithActionInterceptionAspectWithNewMethodOfOnInvokeThatHasMoreThenOneArgument_ThrowsAspectTypeMismatchException() { var method = GetMethod("MethodWithoutParams"); var aspect = new MethodInterceptionAspectAttribute(typeof(TestInterceptionAspectWithNewMethodOfOnInvokeThatHasMoreThenOneArgument)); AspectTypeValidator.ValidateMethodAspect(aspect, method); }
public void ParameterslessMethodWithReturnType_DecoratedWithFunctionAspectThatHasAtLeastOneParameter_ThrowsAspectTypeMismatchException() { var method = GetMethod("MethodWithoutParamsWithBoolReturnType"); var aspect = new OnMethodBoundaryAspectAttribute(typeof(TestAspect)); AspectTypeValidator.ValidateMethodAspect(aspect, method); }
public void Method_DecoratedWithFunctionAspectThatHasNoAdvices_ThrowsAdviceNotFoundException() { var method = GetMethod("MethodWithStringParamAndBoolReturnType"); var aspect = new OnMethodBoundaryAspectAttribute(typeof(NoAdviceAspect)); AspectTypeValidator.ValidateMethodAspect(aspect, method); }
public void MethodWithoutReturnType_DecoratedWithOnFunctionBoundaryAspectAttribute_ThrowsAspectAnnotationException() { var method = GetMethod("MethodWithStringParamAndVoidReturnType"); var aspect = new OnMethodBoundaryAspectAttribute(typeof(TestAspect)); AspectTypeValidator.ValidateMethodAspect(aspect, method); }
public void ParameterslessMethodAndNoReturnType_DecoratedWithFunctionAspect_ThrowsAspectAnnotationException() { var method = GetMethod("MethodWithoutParams"); var aspect = new OnMethodBoundaryAspectAttribute(typeof(TestAspect)); AspectTypeValidator.ValidateMethodAspect(aspect, method); }
public void MethodWithAReturnType_DecoratedWithActionAspect_ThrowsAspectTypeMismatchException() { var method = GetMethod("MethodWithStringParamAndBoolReturnType"); var aspect = new OnMethodBoundaryAspectAttribute(typeof(TestAspect6)); AspectTypeValidator.ValidateMethodAspect(aspect, method); }
public void ParameterlessWithReturnTypeMethod_DecoratedWithMatchedFunctionAspectsWithoutParametersAndReturnType_ReturnsNoErrorFromValidation() { var method = GetMethod("MethodWithoutParamsWithBoolReturnType"); var aspect = new OnMethodBoundaryAspectAttribute(typeof(TestAspect2)); AspectTypeValidator.ValidateMethodAspect(aspect, method); }
public void MethodInterceptionAspectAttribute_GivenAnOnMethodBoundaryAspectTypeAsAnArgument_ThrowsAspectAnnotationException() { var method = GetMethod("MethodWithStringParamAndBoolReturnType"); var aspect = new MethodInterceptionAspectAttribute(typeof(TestAspect)); AspectTypeValidator.ValidateMethodAspect(aspect, method); }
public void MethodWithStringParamAndBoolReturnType_DecoratedWithMatchedOnFunctionBoundaryAspect_ReturnsNoErrorFromValidation() { var method = GetMethod("MethodWithStringParamAndBoolReturnType"); var aspect = new OnMethodBoundaryAspectAttribute(typeof(TestAspect)); AspectTypeValidator.ValidateMethodAspect(aspect, method); }
public void ParameterlessEventWithReturnType_DecoratedWithMatchedFunctionAspectsWithoutParametersAndReturnType_ReturnsNoErrorFromValidation() { var Event = GetEvent("EventWithoutParamsWithBoolReturnType"); var aspect = new EventInterceptionAspectAttribute(typeof(TestAspect2)); AspectTypeValidator.ValidateEventAspect(aspect, Event); }
public void ParameterslessMethodWithReturnType_DecoratedWithOnActionInterceptionAspectWithOneArgumentThatHasTheSameUnderlyingTypeAsTheReturnTypeOfTheMethod_ThrowsAspectAnnotationException() { var method = GetMethod("MethodWithoutParamsWithBoolReturnType"); var aspect = new MethodInterceptionAspectAttribute(typeof(TestAspect5)); AspectTypeValidator.ValidateMethodAspect(aspect, method); }
public void MethodWithOneParemeterAndReturnType_DecoratedWithFunctionAspectThatHasDifferentSetOfParameters_ThrowsAspectTypeMismatchException() { var method = GetMethod("MethodWithStringParamAndBoolReturnType"); var aspect = new OnMethodBoundaryAspectAttribute(typeof(TestAspect4)); AspectTypeValidator.ValidateMethodAspect(aspect, method); }
public void SetPropertyOfContractType_DerivedByAnInterfaceTypeThatExposesBothPropertiesAndDecoratedWithMatchedPropertyInterceptionAspect_ThrowsPropertyAccessorsMismatchException() { var contractProperty = GetProperty("SetAccessorProperty"); var implProperty = GetProperty("SetAccessorProperty", typeof(ISubjectExtended)); var aspect = new PropertyInterceptionAspectAttribute(typeof(PropertyInterceptionAspect)); AspectTypeValidator.ValidatePropertyAspect(aspect, contractProperty, implProperty); }
public void GetProperty_DecoratedWithMatchedPropertyInterceptionAspectThatHasNoAdvices_ThrowsAdviceNotFoundException() { var contractProperty = GetProperty("GetAccessorProperty"); var implProperty = GetProperty("GetAccessorProperty", typeof(Subject)); var aspect = new PropertyInterceptionAspectAttribute(typeof(NoAdviceAspect)); AspectTypeValidator.ValidatePropertyAspect(aspect, contractProperty, implProperty); }
public void GetProperty_DecoratedWithMatchedPropertyInterceptionAspectWithNewMethodOfOnSetValueThatHasMoreThenOneArgument_ThrowsAspectTypeMismatchException() { var contractProperty = GetProperty("GetAccessorProperty"); var implProperty = GetProperty("GetAccessorProperty", typeof(Subject)); var aspect = new PropertyInterceptionAspectAttribute(typeof(PropertyInterceptionAspectWithNewMethodOfOnSetValueThatHasMoreThenOneArgument)); AspectTypeValidator.ValidatePropertyAspect(aspect, contractProperty, implProperty); }
public void SetPropertyOfContractType_ImplementedByATypeThatExposesBothPropertiesAndDecoratedWithMatchedPropertyInterceptionAspect_ReturnsNoErrorFromValidation() { var contractProperty = GetProperty("SetAccessorProperty"); var implProperty = GetProperty("SetAccessorProperty", typeof(Subject)); var aspect = new PropertyInterceptionAspectAttribute(typeof(PropertyInterceptionAspect)); AspectTypeValidator.ValidatePropertyAspect(aspect, contractProperty, implProperty); }