Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Poincut questions

I'm using the virtual mock objects technique described in www.xprogramming.com/xpmag/virtualMockObjects.htm
along with Manual LaFlamme's exellent dbunit framework www.dbunit.org.

I'm using the following pointcuts, my intent is to advise all of my code with virtual Mocks so that I avoid database access, but to 'un-advise' my DatabaseTestCase+ classes so that they *do* go out and hit the database.

I can't seem to find the idiom(and maybe I'm using bad pointcut idioms) that will allow this.

pointcut allCalls() : execution(* *.*(..)) && !within(ComponentTestCase);

pointcut dbUnitCalls() : execution(* org.dbunit.DatabaseTestCase+.*(..));

pointcut dataCalls() : allCalls() && !dbUnitCalls();

Object around(): dataCalls()
{
...
}

any ideas?

thanks,
---
Keith Sader
Nash Resources Group sub-contracting for Computer Sciences Corporation
IAD:TFAS
Email:keith.d.sader@xxxxxxxx
We've got a blind date with destiny, and it looks like she ordered the lobster.


Back to the top