1 package org.apache.torque.avalon; 2 20 21 import org.apache.avalon.framework.component.ComponentException; 22 import org.apache.fulcrum.testcontainer.BaseUnitTest; 23 24 30 public class AvalonTest extends BaseUnitTest 31 { 32 private Torque torque = null; 33 34 39 public AvalonTest(String name) 40 { 41 super( name ); 42 } 43 44 public void setUp() throws Exception 45 { 46 super.setUp(); 47 try 48 { 49 torque = (Torque) this.resolve( Torque.class.getName() ); 50 } 51 catch (ComponentException e) 52 { 53 e.printStackTrace(); 54 fail(e.getMessage()); 55 } 56 } 57 58 61 public void testAvalon() 62 { 63 assertTrue(torque.isInit()); 64 assertTrue("Instances should be identical", torque == org.apache.torque.Torque.getInstance()); 65 } 66 } 67 | Popular Tags |