Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Test-Driven Development and Aspect Oriented Programming

On Saturday 18 January 2003 22:40, Arno Schmidmeier wrote:

> I am not aware of any other natural way, except testing the
> end2end-functionality, in which the aspect is involved,  if the
> crosscutting aspect logic works as designed. You will end up with
> writting crosscutting tests for modularised code, which was former
> crosscutting. However if you can aford that, I bet you do not need
> AOP. ;-)

Without having tried (yet)... why not have an aspect on an aspect, 
i.e., an around advice on execution of an aspect that just sets a flag 
(or grabs the thisJoinPoint information) before proceeding and the 
tests tearDown checks whether the flag is set (or the 
whatJoinPointsWereMet string / container)?

> Please correct me if I am wrong.
> Do you write test cases for every very randomly executing
> try{}catch() statements?

For some I do... and especially for beginners these aspect tests may be 
useful to make sure all pointcuts still work as exepected after 


Back to the top