Home > Back-end >  How to test pointcut method in Spring AOP?
How to test pointcut method in Spring AOP?

Time:07-26

I have already covered with tests target method (validateScope) but Sonar is complaining about uncovered test for pointcut method. How actually this method can be tested?

enter image description here

CodePudding user response:

I'm fairly confident you are not going to be able to "test" that line as I don't think it's actually executed by anything.

There'll be some annotations you can apply or some file filter that you can apply to sonar that can exclude that file from coverage requirements.

  • Related