When writing aspects, how can I test that they do match and that they are invoked when I want them to?
I’m using @Aspect declarations with Spring 2.5.6.
I don’t care about the functionality, that’s extracted and tested otherwise.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I ended up creating something which is a bit of an integration test, in the following way:
Created a Spring-aware JUnit test
Created a spring configuration for this test which:
declares a bean which should be picked up by the aspect
In the unit test I retrieve the dummy service and invoke its methods