1 package org.apache.torque; 2 3 21 22 import junit.framework.TestCase; 23 24 32 public abstract class BaseTestCase extends TestCase 33 { 34 35 protected static final String CONFIG_FILE 36 = "src/test/TurbineResources.properties"; 37 38 39 private static boolean hasInitialized = false; 40 41 46 public BaseTestCase(String name) 47 { 48 super(name); 49 } 50 51 55 public void setUp() 56 { 57 synchronized (BaseTestCase.class) 58 { 59 if (!hasInitialized) 60 { 61 try 62 { 63 Torque.init(CONFIG_FILE); 64 hasInitialized = true; 65 } 66 catch (Exception e) 67 { 68 fail("Couldn't initialize Torque: " + e.getMessage()); 69 } 70 } 71 } 72 } 73 } 74 | Popular Tags |