Make Advice consume IMethodAdviceContext instead of MethoadAdviceContext
See original GitHub issueI have an attribute that consumes IMethodAdvise
which I want to test.
I’ve tried testing it’s advise method and stepped into a problem:
MethodAdviceContext
has not parallel interface to mock by.- some of
MethodAdviceContext's
Constructor parameters are Internal (and also have not interface) and therefore I cannot instantiate them (and therefore, no testing for me 😦 )
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (10 by maintainers)
Top Results From Across the Web
Spring AOP not working for method call inside another ...
It's a workaround but will do the trick, the key here is to use the same bean (proxy) to invoke 'method2' instead of...
Read more >Declaring Advice :: Spring Framework
We see how to make argument and other contextual values available to the advice body later in this section. First, we take a...
Read more >Introduction to Advice Types in Spring
A quick intro to AOP in Spring and working with Advice types to cross-cut across your application concerns.
Read more >Spring AOP Example Tutorial - Aspect, Advice, Pointcut, ...
It is the responsibility of around advice to invoke the join point method and return values if the method is returning something. We...
Read more >MrAdvice 2.12.2
Advice allows you to: Advise methods or parameters, at assembly, type, method or parameter level; Advice types (at assembly startup); Introduce fields; Advise...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Kinda forgot to try it… tried it now and works like charm 😃
again, thank you for listening and making it work 😃
True. I can pass down parameters to anything rather Easely except one case:
context.Proceed()
wrapping it is possible but it will look rather close to Microsoft’s
HttpContextWrapper
solution for the sealedHttpContext
(if you know what I’m speaking of), which I personally prefer to avoidOn Wed, Jul 6, 2016 at 6:34 PM, Pascal Craponne notifications@github.com wrote: