1 16 package net.sf.cglib.proxy; 17 18 import net.sf.cglib.CodeGenTestCase; 19 import java.lang.reflect.*; 20 import java.util.*; 21 import junit.framework.*; 22 23 public class TestNoOp extends CodeGenTestCase { 24 private static class Foo { 25 public Foo() { } 26 public String toString() { 27 return "foo"; 28 } 29 } 30 31 public void testNoOp() { 32 Object obj = Enhancer.create(Foo.class, NoOp.INSTANCE); 33 assertTrue("foo".equals(obj.toString())); 34 } 35 36 public TestNoOp(String testName) { 37 super(testName); 38 } 39 40 public static void main(String [] args) { 41 junit.textui.TestRunner.run(suite()); 42 } 43 44 public static Test suite() { 45 return new TestSuite(TestNoOp.class); 46 } 47 48 public void perform(ClassLoader loader) throws Throwable { 49 } 50 51 public void testFailOnMemoryLeak() throws Throwable { 52 } 53 54 } 55 | Popular Tags |