public void FunctionWithoutArguments_OnMethodBoundaryAspectWithOnlyOnEntryAdvice_ReturnsTheCorrectSequenceOfAdvices() { var instance = container.Resolve <IFunctionWithoutArgumentsComposite>(); var result = instance.OnMethodBoundaryAspectWithOnlyOnEntryAdvide(); var joinPoints = new OnMethodBoundaryAspectWithOnlyOnEntryAdviceOrderedJoinPoints(); Assert.AreEqual(result, new ReturnValueAspectOrderedJoinPoints(joinPoints).ToString()); }
public void ActionWith2RefArguments_OnMethodBoundaryAspectWithOnlyOnEntryAdvice_ReturnsTheCorrectSequenceOfAdvices() { var instance = container.Resolve <IActionWith2RefArgumentsComposite>(); var joinPoints = new OnMethodBoundaryAspectWithOnlyOnEntryAdviceOrderedJoinPoints().Calculate(); instance.OnMethodBoundaryAspectWithOnlyOnEntryAdvide(ref i, ref j); Assert.AreEqual(i, joinPoints); Assert.AreEqual(j, joinPoints); }
public void ActionWith2Arguments_OnMethodBoundaryAspectWithOnlyOnEntryAdvice_ReturnsTheCorrectSequenceOfAdvices() { var instance = container.Resolve <IActionWith2ArgumentsComposite>(); var first = new List <AspectJoinPoints>(); var second = new List <AspectJoinPoints>(); var joinPoints = new OnMethodBoundaryAspectWithOnlyOnEntryAdviceOrderedJoinPoints(); instance.OnMethodBoundaryAspectWithOnlyOnEntryAdvide(first, second); CollectionAssert.AreEqual(first, joinPoints); CollectionAssert.AreEqual(second, joinPoints); }
public void FunctionWith3Arguments_OnMethodBoundaryAspectWithOnlyOnEntryAdvice_ReturnsTheCorrectSequenceOfAdvices() { var instance = container.Resolve <IFunctionWith3ArgumentsComposite>(); var first = new List <AspectJoinPoints>(); var second = new List <AspectJoinPoints>(); var third = new List <AspectJoinPoints>(); var result = instance.OnMethodBoundaryAspectWithOnlyOnEntryAdvide(first, second, third); var joinPoints = new OnMethodBoundaryAspectWithOnlyOnEntryAdviceOrderedJoinPoints(); CollectionAssert.AreEqual(first, joinPoints); CollectionAssert.AreEqual(second, joinPoints); CollectionAssert.AreEqual(third, joinPoints); Assert.AreEqual(result, new ReturnValueAspectOrderedJoinPoints(joinPoints).ToString()); }
public void FunctionWith5RefArguments_OnMethodBoundaryAspectWithOnlyOnEntryAdvice_ReturnsTheCorrectSequenceOfAdvices() { var instance = container.Resolve <IFunctionWith5RefArgumentsComposite>(); var result = instance.OnMethodBoundaryAspectWithOnlyOnEntryAdvide(ref i, ref j, ref k, ref l, ref m); var joinPoints = new OnMethodBoundaryAspectWithOnlyOnEntryAdviceOrderedJoinPoints(); 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(result, new ReturnValueAspectOrderedJoinPoints(joinPoints).ToString()); }