public void FunctionWithoutArguments_AnnotatedWithAllAspectsStartingFromInterceptionAspectThatCallsTheInvokeMethodOfTheArgs_ReturnsTheInMethodAdviceAndIgnoresAllOtherAspects()
        {
            var instance = container.Resolve<IFunctionWithoutArgumentsComposite>();
            var result = instance.InterceptionAspectUsingInvoke();
            var joinPoints = new InterceptionAspectUsingInvokeOrderedJoinPoints();

            Assert.AreEqual(result, new ReturnValueAspectOrderedJoinPoints(joinPoints).ToString());
        }
        public void ActionWith2RefArguments_AnnotatedWithAllAspectsStartingFromInterceptionAspectThatCallsTheInvokeMethodOfTheArgs_ReturnsTheInMethodAdviceAndIgnoresAllOtherAspects()
        {
            var instance = container.Resolve<IActionWith2RefArgumentsComposite>();
            var joinPoints = new InterceptionAspectUsingInvokeOrderedJoinPoints().Calculate();

            instance.InterceptionAspectUsingInvoke(ref i, ref j);

            Assert.AreEqual(i, joinPoints);
            Assert.AreEqual(j, joinPoints);
        }
        public void ActionWith2Arguments_AnnotatedWithAllAspectsStartingFromInterceptionAspectThatCallsTheInvokeMethodOfTheArgs_ReturnsTheInMethodAdviceAndIgnoresAllOtherAspects()
        {
            var instance = container.Resolve<IActionWith2ArgumentsComposite>();
            var first = new List<AspectJoinPoints>();
            var second = new List<AspectJoinPoints>();
            var joinPoints = new InterceptionAspectUsingInvokeOrderedJoinPoints();

            instance.InterceptionAspectUsingInvoke(first, second);

            CollectionAssert.AreEqual(first, joinPoints);
            CollectionAssert.AreEqual(second, joinPoints);
        }
        public void FunctionWith7RefArguments_AnnotatedWithAllAspectsStartingFromInterceptionAspectThatCallsTheInvokeMethodOfTheArgs_ReturnsTheInMethodAdviceAndIgnoresAllOtherAspects()
        {
            var instance = container.Resolve<IFunctionWith7RefArgumentsComposite>();
            var result = instance.InterceptionAspectUsingInvoke(ref i, ref j, ref k, ref l, ref m, ref n, ref o);
            var joinPoints = new InterceptionAspectUsingInvokeOrderedJoinPoints();
            var calculated = joinPoints.Calculate();

            Assert.AreEqual(i, calculated);
            Assert.AreEqual(j, calculated);
            Assert.AreEqual(k, calculated);
            Assert.AreEqual(l, calculated);
            Assert.AreEqual(m, calculated);
            Assert.AreEqual(n, calculated);
            Assert.AreEqual(o, calculated);
            Assert.AreEqual(result, new ReturnValueAspectOrderedJoinPoints(joinPoints).ToString());
        }
        public void FunctionWith4Arguments_AnnotatedWithAllAspectsStartingFromInterceptionAspectThatCallsTheInvokeMethodOfTheArgs_ReturnsTheInMethodAdviceAndIgnoresAllOtherAspects()
        {
            var instance = container.Resolve<IFunctionWith4ArgumentsComposite>();
            var first = new List<AspectJoinPoints>();
            var second = new List<AspectJoinPoints>();
            var third = new List<AspectJoinPoints>();
            var fourth = new List<AspectJoinPoints>();
            var result = instance.InterceptionAspectUsingInvoke(first, second, third, fourth);
            var joinPoints = new InterceptionAspectUsingInvokeOrderedJoinPoints();

            CollectionAssert.AreEqual(first, joinPoints);
            CollectionAssert.AreEqual(second, joinPoints);
            CollectionAssert.AreEqual(third, joinPoints);
            CollectionAssert.AreEqual(fourth, joinPoints);
            Assert.AreEqual(result, new ReturnValueAspectOrderedJoinPoints(joinPoints).ToString());
        }