package net.yher2.workstyle.test;

import java.sql.Connection;
import java.sql.SQLException;

import net.yher2.commons.torque.TorqueUtils;

import org.apache.torque.Torque;
import org.apache.torque.TorqueException;

public class DBTestCase extends net.yher2.junit.db.DBTestCase {

	@Override
	protected Connection getConnection() throws SQLException {
		try {
			return Torque.getConnection();
		} catch (TorqueException e) {
			SQLException exception = new SQLException(e.getMessage());
			exception.setStackTrace(e.getStackTrace());
			throw exception;
		}
	}

	@Override
	protected void setUp() throws Exception {
		super.setUp();
		TorqueUtils.initialize("Torque.properties");
	}

}
