KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > barracuda > testbed > DefaultTestCase


1 /*
2  * Copyright 2002 ATMReports.com. All Rights Reserved.
3  *
4  * This software is the proprietary information of ATMReports.com.
5  * Use is subject to license terms.
6  *
7  * $Id:
8  */

9 package org.enhydra.barracuda.testbed;
10
11 import junit.framework.*;
12 import org.apache.log4j.*;
13 import org.apache.log4j.xml.*;
14
15
16 /**
17  * The base class from which all other Barracuda test classes should extend.
18  * Will automatically configure log4j based on the settings in WEB-INF/log4j.xml
19  */

20 public class DefaultTestCase extends TestCase {
21     //common vars (customize for every test class)
22
public static String JavaDoc testClass = DefaultTestCase.class.getName();
23     public static Logger logger = Logger.getLogger("test."+testClass);
24
25     //variables
26
public final static String JavaDoc TEST_SUITE_USER = "TestSuiteUser";
27
28     //-------------------- Basics --------------------------------
29
/**
30      * Public Constructor
31      */

32     public DefaultTestCase(String JavaDoc name) {
33         super(name);
34     }
35
36
37     /**
38      * Static initializer, for the first time a test case is accessed. The
39      * basic purpose of this is to set up the default ObjectRepository to
40      * match what we expect at runtime.
41      */

42     static {
43         //manually configure the log4j stuff
44
DOMConfigurator.configure("../WEB-INF/log4j.xml");
45     }
46
47 }
48
Popular Tags