1 22 package org.jboss.test.aop.dotinpointcutname; 23 24 import org.jboss.test.aop.AOPTestWithSetup; 25 26 import junit.framework.Test; 27 import junit.framework.TestSuite; 28 import junit.textui.TestRunner; 29 30 35 public class DotInPointcutNameTestCase extends AOPTestWithSetup 36 { 37 public static void main(String [] args) 38 { 39 TestRunner.run(suite()); 40 } 41 42 public static Test suite() 43 { 44 TestSuite suite = new TestSuite("DotInPointcutNameTester"); 45 suite.addTestSuite(DotInPointcutNameTestCase.class); 46 return suite; 47 } 48 49 public DotInPointcutNameTestCase(String name) 50 { 51 super(name); 52 } 53 54 public void testPointcut()throws Exception 55 { 56 POJO pojo = new POJO(); 57 pojo.someMethod(); 58 pojo.otherMethod(); 59 assertEquals("Wrong number of interceptions", 2, SimpleInterceptor.interceptions); 60 System.out.println(SimpleInterceptor.interceptions); 61 62 63 64 } 65 } 66 | Popular Tags |