Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 2 3 package org.apache.avalon.meta.legacy; 4 5 import org.apache.avalon.meta.info.Type; 6 import org.apache.avalon.meta.info.builder.TypeBuilder; 7 import junit.framework.TestCase; 8 9 public class LegacyTestCase extends TestCase 10 { 11 private Type m_type; 12 13 public LegacyTestCase( ) 14 { 15 this( "legacy" ); 16 } 17 18 public LegacyTestCase( String name ) 19 { 20 super( name ); 21 } 22 23 protected void setUp() throws Exception 24 { 25 TypeBuilder builder = new TypeBuilder(); 26 ClassLoader loader = Thread.currentThread().getContextClassLoader(); 27 Class clazz = loader.loadClass( "org.apache.avalon.meta.legacy.Test" ); 28 m_type = builder.buildType( clazz ); 29 } 30 31 public void testName() throws Exception 32 { 33 assertTrue( m_type.getInfo().getName().equals( "test" ) ); 34 } 35 36 public void testLifestyle() throws Exception 37 { 38 assertTrue( m_type.getInfo().getLifestyle().equals( "singleton" ) ); 39 } 40 41 public void testClassName() throws Exception 42 { 43 assertTrue( 44 m_type.getInfo().getClassname().equals( "org.apache.avalon.meta.legacy.Test" ) ); 45 } 46 } 47
| Popular Tags
|