public void MethodWithOnMethodBoundaryAspectAttribute_DecoratedWithMatchedFunctionAspects_ReturnsNoErrorFromValidation() { var method = GetMethod("MethodWithStringParamAndBoolReturnType"); var aspect = new OnMethodBoundaryAspectAttribute(typeof(TestAspect)); AspectTypeMethodValidator.ValidateMethodAspect(aspect, method); }
public void MethodInterceptionAspectAttribute_GivenAnOnMethodBoundaryAspectTypeAsAnArgument_ThrowsAspectAnnotationException() { var method = GetMethod("MethodWithStringParamAndBoolReturnType"); var aspect = new MethodInterceptionAspectAttribute(typeof(TestAspect)); AspectTypeMethodValidator.ValidateMethodAspect(aspect, method); }
public void MethodWithOnMethodBoundaryAspectAttribute_DecoratedWithFunctionAspectThatHasNoAdvices_ThrowsAdviceNotFoundException() { var method = GetMethod("MethodWithStringParamAndBoolReturnType"); var aspect = new OnMethodBoundaryAspectAttribute(typeof(NoAdviceAspect)); AspectTypeMethodValidator.ValidateMethodAspect(aspect, method); }
public void ParameterslessMethodWithOnMethodBoundaryAspectAttribute_DecoratedWithFunctionAspectThatHasAtLeastOneParameter_ThrowsAspectTypeMismatchException() { var method = GetMethod("MethodWithoutParamsWithReturnType"); var aspect = new OnMethodBoundaryAspectAttribute(typeof(TestAspect)); AspectTypeMethodValidator.ValidateMethodAspect(aspect, method); }
public void ParameterslessMethodOnNoReturnTypeWithOnMethodBoundaryAspectAttribute_DecoratedWithFunctionAspect_ThrowsAspectAnnotationException() { var method = GetMethod("MethodWithoutParams"); var aspect = new OnMethodBoundaryAspectAttribute(typeof(TestAspect)); AspectTypeMethodValidator.ValidateMethodAspect(aspect, method); }
public void MethodWithOnMethodBoundaryAspectAttribute_DecoratedWithFunctionAspectThatHasDifferentSetOfParameters_ThrowsAspectTypeMismatchException() { var method = GetMethod("MethodWithStringParamAndBoolReturnType"); var aspect = new OnMethodBoundaryAspectAttribute(typeof(TestAspect4)); AspectTypeMethodValidator.ValidateMethodAspect(aspect, method); }
public void ParameterlessWithReturnTypeMethodWithOnMethodBoundaryAspectAttribute_DecoratedWithMatchedFunctionAspectsWithoutParametersAndReturnType_ReturnsNoErrorFromValidation() { var method = GetMethod("MethodWithoutParamsWithReturnType"); var aspect = new OnMethodBoundaryAspectAttribute(typeof(TestAspect2)); AspectTypeMethodValidator.ValidateMethodAspect(aspect, method); }