User development,
A new message was posted in the thread "withincode from JUnit test not
working":
http://community.jboss.org/message/522805#522805
Author : Flavia Rainone
Profile :
http://community.jboss.org/people/flavia.rainone@jboss.com
Message:
--------------------------------------------------------------
nizzy wrote:
In the past I have been able to use the call and withincode combination, however the java
class defined in the withincode was not a JUnit test.
How about other calls that
match the call pointcut (without within/withincode)? Calls made from other points of your
code should be intercepted.
If there isn't such a call, I would replace your call in the test class:
public class MyTest extends TestCase{
public void testSomething()
{
pojo.call();
}
}
By something like this:
public class MyTest extends TestCase
{
public void testSomething()
{
Caller.call();
}
}
public Caller
{
public static void call()
{
pojo.call();
}
}
I.e., I would move that call to another class, and see if JBoss AOP intercepts it. If it
doesn't, it definitely has nothing to do with being inside a test class. And, since we
have tests for all pointcut types, I would guess that the problem is somewhere else in
that case.
--------------------------------------------------------------
To reply to this message visit the message page:
http://community.jboss.org/message/522805#522805