1 package org.apache.turbine;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import junit.framework.Test;
20 import junit.framework.TestSuite;
21
22 import org.apache.turbine.Turbine;
23 import org.apache.turbine.test.BaseTestCase;
24 import org.apache.turbine.util.TurbineConfig;
25
26 /***
27 * Can we call "destroy" unconditionally on our Turbine Servlet, even if
28 * it hasn't configured?
29 *
30 * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
31 * @version $Id: DestroyTest.java 264148 2005-08-29 14:21:04Z henning $
32 */
33 public class DestroyTest
34 extends BaseTestCase
35 {
36 private static TurbineConfig tc = null;
37
38 public DestroyTest(String name)
39 throws Exception
40 {
41 super(name);
42 tc = new TurbineConfig(".", "/conf/test/TemplateService.properties");
43 }
44
45 public static Test suite()
46 {
47 return new TestSuite(DestroyTest.class);
48 }
49
50 public void testDestroy()
51 throws Exception
52 {
53 Turbine t = new Turbine();
54 t.destroy();
55 }
56
57 public void testInitAndDestroy()
58 throws Exception
59 {
60 tc.initialize();
61 tc.dispose();
62 }
63 }