1 22 package org.jboss.test.proxyfactory.test; 23 24 import java.lang.reflect.Method ; 25 26 import junit.framework.Test; 27 28 import org.jboss.test.proxyfactory.AbstractProxyTest; 29 import org.jboss.test.proxyfactory.support.ReturningInterceptor; 30 import org.jboss.test.proxyfactory.support.Simple; 31 32 38 public class HollowTestCase extends AbstractProxyTest 39 { 40 public void testHollow() throws Exception 41 { 42 Simple simple = (Simple) assertCreateHollowProxy(new Class [] { Simple.class }, null, Simple.class); 43 ReturningInterceptor.invoked = null; 44 simple.doSomething(); 45 46 Method method = ReturningInterceptor.invoked; 47 assertNotNull(method); 48 assertEquals("doSomething", method.getName()); 49 } 50 51 public static Test suite() 52 { 53 return suite(HollowTestCase.class); 54 } 55 56 public HollowTestCase(String name) 57 { 58 super(name); 59 } 60 } 61 | Popular Tags |