You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AOPAllianceAdapterTest.java 658B

12345678910111213141516171819
  1. package org.aspectj.aopalliance.tests;
  2. import junit.framework.TestCase;
  3. public class AOPAllianceAdapterTest extends TestCase {
  4. public void testHello() {
  5. Hello h = new Hello();
  6. h.sayHello();
  7. Hello h2 = new Hello("Hello AOP Alliance");
  8. h2.sayHello();
  9. assertTrue("Constructor executed", Hello.defaultConsExecuted);
  10. assertTrue("2nd Constructor executed", Hello.paramConsExecuted);
  11. assertEquals("sayHello invoked twice",2,Hello.sayHelloCount);
  12. assertEquals("Constructor interceptor ran twice",2,HelloConstructionInterceptor.runCount);
  13. assertEquals("Method interceptor ran twice",2,HelloMethodInterceptor.runCount);
  14. }
  15. }