1 17 package org.apache.avalon.excalibur.component.test; 18 19 import junit.framework.TestCase; 20 21 import org.apache.avalon.excalibur.component.ComponentProxyGenerator; 22 import org.apache.avalon.framework.component.Component; 23 24 31 public final class ComponentProxyGeneratorTestCase 32 extends TestCase 33 { 34 public ComponentProxyGeneratorTestCase( String name ) 35 { 36 super( name ); 37 } 38 39 public void testGenerateComponent() 40 throws Exception 41 { 42 Integer testInt = new Integer ( 7 ); 43 ComponentProxyGenerator proxyGen = new ComponentProxyGenerator(); 44 45 final Component component = 46 proxyGen.getProxy( "java.lang.Comparable", testInt ); 47 assertTrue( component != null ); 48 assertTrue( component instanceof Comparable ); 49 50 Comparable comp = (Comparable )component; 51 assertEquals( 0, comp.compareTo( testInt ) ); 52 53 61 } 62 } 63 | Popular Tags |