1 package org.apache.torque; 2 3 18 19 import junit.framework.TestCase; 20 21 28 public abstract class BaseRuntimeTestCase extends TestCase 29 { 30 31 private static final String CONFIG_FILE 32 = "target/test/rttest/Torque.properties"; 33 34 35 static boolean hasInitialized = false; 36 37 40 public BaseRuntimeTestCase(String name) 41 { 42 super(name); 43 } 44 45 49 public void setUp() 50 { 51 synchronized (BaseRuntimeTestCase.class) 52 { 53 if (!hasInitialized) 54 { 55 try 56 { 57 Torque.init(CONFIG_FILE); 58 hasInitialized = true; 59 } 60 catch (Exception e) 61 { 62 fail("Couldn't initialize Torque: " + e.getMessage()); 63 } 64 } 65 } 66 } 67 68 } 69 | Popular Tags |