コード例 #1
0
        public void EventWithOneParameterAndNoReturnType_DecoratedWithOnFunctionInterceptionAspectWithOneAReturnTypeThatIsTheSameUnderlyingTypeAsTheParameterOfTheEvent_ThrowsAspectAnnotationException()
        {
            var Event  = GetEvent("EventWithIntParamAndNoReturnType");
            var aspect = new EventInterceptionAspectAttribute(typeof(TestEventFunctionInterceptionAspect));

            AspectTypeValidator.ValidateEventAspect(aspect, Event);
        }
コード例 #2
0
        public void EventWithoutReturnType_DecoratedWithEventActionInterceptionAspectWithNewEventOfOnInvokeThatHasAReturnType_ThrowsAspectTypeMismatchException()
        {
            var Event  = GetEvent("EventWithoutParams");
            var aspect = new EventInterceptionAspectAttribute(typeof(TestInterceptionAspectWithNewEventOfOnInvokeThatHasAReturnType));

            AspectTypeValidator.ValidateEventAspect(aspect, Event);
        }
コード例 #3
0
        public void EventWithoutReturn_DecoratedWithOnActionBoundaryAspectWithNewEventOfOnAddHandlerThatHasMoreThenOneArgument_ThrowsAspectTypeMismatchException()
        {
            var Event  = GetEvent("EventWithoutParams");
            var aspect = new EventInterceptionAspectAttribute(typeof(TestEventInterceptionAspectWithNewEventOfOnAddHandlerThatHasMoreThenOneArgument));

            AspectTypeValidator.ValidateEventAspect(aspect, Event);
        }
コード例 #4
0
        public void ParameterslessEventWithReturnType_DecoratedWithFunctionAspectThatHasAtLeastOneParameter_ThrowsAspectTypeMismatchException()
        {
            var Event  = GetEvent("EventWithoutParamsWithBoolReturnType");
            var aspect = new EventInterceptionAspectAttribute(typeof(TestAspect));

            AspectTypeValidator.ValidateEventAspect(aspect, Event);
        }
コード例 #5
0
        public void Event_DecoratedWithFunctionAspectThatHasNoAdvices_ThrowsAdviceNotFoundException()
        {
            var Event  = GetEvent("EventWithStringParamAndBoolReturnType");
            var aspect = new EventInterceptionAspectAttribute(typeof(NoAdviceAspect));

            AspectTypeValidator.ValidateEventAspect(aspect, Event);
        }
コード例 #6
0
        public void EventWithOneParemeterAndReturnType_DecoratedWithEventFunctionAspectThatHasDifferentSetOfParameters_ThrowsAspectTypeMismatchException()
        {
            var Event  = GetEvent("EventWithStringParamAndBoolReturnType");
            var aspect = new EventInterceptionAspectAttribute(typeof(TestAspect4));

            AspectTypeValidator.ValidateEventAspect(aspect, Event);
        }
コード例 #7
0
        public void ParameterslessEventAndNoReturnType_DecoratedWithFunctionAspect_ThrowsAspectAnnotationException()
        {
            var Event  = GetEvent("EventWithoutParams");
            var aspect = new EventInterceptionAspectAttribute(typeof(TestAspect));

            AspectTypeValidator.ValidateEventAspect(aspect, Event);
        }
コード例 #8
0
        public void EventWithAReturnType_DecoratedWithEventActionAspect_ThrowsAspectTypeMismatchException()
        {
            var Event  = GetEvent("EventWithStringParamAndBoolReturnType");
            var aspect = new EventInterceptionAspectAttribute(typeof(EventAction));

            AspectTypeValidator.ValidateEventAspect(aspect, Event);
        }
コード例 #9
0
        public void EventWithoutReturnType_DecoratedWithEventInterceptionAspectAttribute_ThrowsAspectAnnotationException()
        {
            var Event  = GetEvent("EventWithStringParamAndVoidReturnType");
            var aspect = new EventInterceptionAspectAttribute(typeof(TestAspect));

            AspectTypeValidator.ValidateEventAspect(aspect, Event);
        }
コード例 #10
0
        public void EventInterceptionAspectAttribute_GivenAnInterceptionAspectTypeAsAnArgument_ThrowsAspectAnnotationException()
        {
            var Event  = GetEvent("EventWithStringParamAndBoolReturnType");
            var aspect = new EventInterceptionAspectAttribute(typeof(TestInterceptionAspect));

            AspectTypeValidator.ValidateEventAspect(aspect, Event);
        }
コード例 #11
0
        public void ParameterlessEventWithReturnType_DecoratedWithMatchedFunctionAspectsWithoutParametersAndReturnType_ReturnsNoErrorFromValidation()
        {
            var Event  = GetEvent("EventWithoutParamsWithBoolReturnType");
            var aspect = new EventInterceptionAspectAttribute(typeof(TestAspect2));

            AspectTypeValidator.ValidateEventAspect(aspect, Event);
        }
コード例 #12
0
        public void EventWithStringParamAndBoolReturnType_DecoratedWithMatchedEventInterceptionAspectAttribute_ReturnsNoErrorFromValidation()
        {
            var Event  = GetEvent("EventWithStringParamAndBoolReturnType");
            var aspect = new EventInterceptionAspectAttribute(typeof(TestAspect));

            AspectTypeValidator.ValidateEventAspect(aspect, Event);
        }