01: package net.sourceforge.squirrel_sql;
02:
03: import junit.framework.TestCase;
04: import net.sourceforge.squirrel_sql.client.ApplicationManager;
05: import net.sourceforge.squirrel_sql.fw.util.log.ILogger;
06: import net.sourceforge.squirrel_sql.fw.util.log.LoggerController;
07:
08: import org.apache.log4j.Level;
09:
10: public class BaseSQuirreLTestCase extends TestCase {
11:
12: protected void setUp() throws Exception {
13: ApplicationManager.initApplication();
14: super .setUp();
15: }
16:
17: protected void tearDown() throws Exception {
18: super .tearDown();
19: }
20:
21: @SuppressWarnings("unchecked")
22: protected static void disableLogging(Class c) {
23: ILogger s_log = LoggerController.createLogger(c);
24: s_log.setLevel(Level.OFF);
25: }
26:
27: @SuppressWarnings("unchecked")
28: protected static void debugLogging(Class c) {
29: ILogger s_log = LoggerController.createLogger(c);
30: s_log.setLevel(Level.DEBUG);
31: }
32:
33: }
|