01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License"); you may not use this file except in
05: * compliance with the License. You may obtain a copy of the License at
06: *
07: * http://www.opensource.org/licenses/ecl1.php
08: *
09: * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS
10: * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
11: * language governing permissions and limitations under the License.
12: */
13: package org.kuali.rice;
14:
15: import org.junit.After;
16: import org.junit.Before;
17: import org.kuali.rice.testharness.HtmlUnitUtil;
18: import org.kuali.rice.testharness.KNSTestCase;
19: import org.kuali.rice.testharness.TransactionalLifecycle;
20:
21: public class TestBase extends KNSTestCase {
22:
23: private TransactionalLifecycle transactionalLifecycle;
24:
25: @Before
26: public void setUp() throws Exception {
27: setContextName("/SampleRiceClient");
28: setRelativeWebappRoot("/src/test/webapp");
29: setSqlFilename("classpath:DefaultTestData.sql");
30: setSqlDelimiter(";");
31: setXmlFilename("classpath:DefaultTestData.xml");
32: setTestConfigFilename("classpath:META-INF/sample-app-test-config.xml");
33: super .setUp();
34: transactionalLifecycle = new TransactionalLifecycle();
35: transactionalLifecycle.start();
36: }
37:
38: @After
39: public void tearDown() throws Exception {
40: try {
41: transactionalLifecycle.stop();
42: } finally {
43: super .tearDown();
44: }
45: }
46:
47: @Override
48: protected String getModuleName() {
49: return "kns";
50: }
51:
52: }
|