Jan 15th, 2008, 09:36 PM
How do I test the pointcuts
I have written an aspect to audit trail some functions in my web services. To test this aspect, I can write a JUnit to cover the recordUserAccess function,
How can I unit test how many functions this adviser is being applied to. I want to test this against the functions which I really want to audit. What might happen
is that as project progresses more functions could sneekily get the adviser, just because they happen to match the expression.
pointcut="execution(* com.mycompany.someproject.service.webservice.*WebS ervice.get*(..)) and args(adviserId)" />
Also, I would not want to copy the expression in a unit test, may be some how excess this pointcut using some Id and test it. Is this possible?