1 22 package org.jboss.test.aop.extender; 23 24 29 public class ExtenderTester implements ExtenderTesterMBean 30 { 31 32 public void testMethod() throws Exception 33 { 34 35 System.out.println("--------------------------- TESTING EXTENDER ------------------"); 36 System.out.println("MY CLASSLOADER " + getClass().getClassLoader()); 37 System.out.println("EXTENDER INTERCEPTOR CLASSLOADER " + ExtenderInterceptor.class.getClassLoader()); 38 39 40 ChildBase childB = new ChildBase(); 41 childB.updateBase(); 42 if(!ExtenderInterceptor.method) 43 throw new RuntimeException ("Expected ExtenderInterceptor.method to be true, it was: "+ExtenderInterceptor.method); 44 45 ExtenderInterceptor.method = false; 46 Base base = new SubBase(); 47 base.setBase(1); 48 if(!ExtenderInterceptor.method) 49 throw new RuntimeException ("Expected ExtenderInterceptor.method to be true, it was: "+ExtenderInterceptor.method); 50 51 ExtenderInterceptor.method = false; 52 ChildExtender ext = new ChildExtender(); 53 ext.updateExtender(); 54 if(!ExtenderInterceptor.method) 55 throw new RuntimeException ("Expected ExtenderInterceptor.method to be true, it was: "+ExtenderInterceptor.method); 56 57 ExtenderInterceptor.method = false; 58 InfantBase infant = new InfantBase(); 59 infant.infantize(3); 60 if(!ExtenderInterceptor.method) 61 throw new RuntimeException ("Expected ExtenderInterceptor.method to be true, it was: "+ExtenderInterceptor.method); 62 63 64 } 65 66 } 67 | Popular Tags |