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 ObjectTestCase extends AbstractProxyTest 39 { 40 public void testObject() throws Exception 41 { 42 Simple simple = (Simple) assertCreateProxy(new Object (), new Class [] { Simple.class }, Simple.class); 43 simple.toString(); 44 ReturningInterceptor.invoked = null; 45 simple.doSomething(); 46 Method method = ReturningInterceptor.invoked; 47 assertNotNull(method); 48 assertEquals("doSomething", method.getName()); 49 } 50 51 public static Test suite() 52 { 53 return suite(ObjectTestCase.class); 54 } 55 56 public ObjectTestCase(String name) 57 { 58 super(name); 59 } 60 } 61 | Popular Tags |