Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] AspectJ & JUnit

Hi,
 
I'm try to intercept executions of Junit TestRunner.run(Class), but its not working. TestRunner is executed in CasosDeTestePDV.main, but I can't intercept it. What's wrong?
 
Thanks
 
public class CasosDeTestePDV extends TestCase {
  test1() {...}
  public static void main(String[] args) {
    junit.textui.TestRunner.run(CasosDeTestePDV.class);
  }
}
 
public aspect Interceptor {
  pointcut p() : execution(* junit.textui.TestRunner.*(..));   
  before() : p() {
    System.out.println(thisJoinPoint);
  }
}
 

Back to the top