1 22 package org.jboss.test.aop.annotatedparams; 23 24 25 import org.jboss.test.aop.AOPTestWithSetup; 26 27 import junit.framework.Test; 28 import junit.framework.TestSuite; 29 30 36 public class AnnotatedParamsTester extends AOPTestWithSetup 37 { 38 public static Test suite() 39 { 40 TestSuite suite = new TestSuite("AnnotatedParamsTester"); 41 suite.addTestSuite(AnnotatedParamsTester.class); 42 return suite; 43 } 44 45 public AnnotatedParamsTester(String name) 46 { 47 super(name); 48 } 49 50 public void testCreateAnnotation() throws Exception 51 { 52 ParamType param = new ParamType(); 53 54 SimpleInterceptor.intercepted = false; 55 POJO pojo = new POJO(param); 56 if (!SimpleInterceptor.intercepted)throw new RuntimeException ("Did not intercept constructor with annotated parameters"); 57 58 SimpleInterceptor.intercepted = false; 59 pojo.method(param); 60 if (!SimpleInterceptor.intercepted)throw new RuntimeException ("Did not intercept method with annotated parameters and return type"); 61 } 62 } 63 64 | Popular Tags |