User development,
A new message was posted in the thread "withincode from JUnit test not
working":
http://community.jboss.org/message/522748#522748
Author : Flavia Rainone
Profile :
http://community.jboss.org/people/flavia.rainone@jboss.com
Message:
--------------------------------------------------------------
nizzy wrote:
As can be seen from the jboss-aop.xml I'm trying to intercept the call to the
ExampleManagerBean->createObject(..) method when called from within the
ExamplemanagerBeanTest. I assume that when the aopc output states that a class has been
compiled it mean that aop has recognized that instrumentation was required. So from the
output I can see that;
> PersistenceHelperTest.class
> PersistenceHelper.class
> PersistenceHelperTest$1.class
> ExampleManagerBean.class
> ExampleManagerBeanTest.class
> MockPersistenceHelper.class
Have been instrumented, is this assumption correct?
Yes, your assumption is correct.
We need to find out why the call joinpoint is not being intercepted. First thing I would
try is replacing the withincode by a simple within and then, if the call you want to
intercept is not being intercepted this way, I would try using the pointcut with the call
expression alone, that is, without the withincode part. For testing purposes, this can be
useful to identify if the problem is the withincode, or if it is intercepting the call
from inside the test class.
The JBoss AOP tests are reproducing both scenarios, and all of our tests are passing, se
we also need to find out what is different in your scenario. This will be the next step.
--------------------------------------------------------------
To reply to this message visit the message page:
http://community.jboss.org/message/522748#522748