001 package org.apache.turbine; 002 003 004 /* 005 * Licensed to the Apache Software Foundation (ASF) under one 006 * or more contributor license agreements. See the NOTICE file 007 * distributed with this work for additional information 008 * regarding copyright ownership. The ASF licenses this file 009 * to you under the Apache License, Version 2.0 (the 010 * "License"); you may not use this file except in compliance 011 * with the License. You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, 016 * software distributed under the License is distributed on an 017 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 018 * KIND, either express or implied. See the License for the 019 * specific language governing permissions and limitations 020 * under the License. 021 */ 022 023 024 import org.apache.turbine.test.BaseTestCase; 025 import org.apache.turbine.util.TurbineConfig; 026 027 /** 028 * Can we call "destroy" unconditionally on our Turbine Servlet, even if 029 * it hasn't configured? 030 * 031 * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a> 032 * @version $Id: DestroyTest.java 615328 2008-01-25 20:25:05Z tv $ 033 */ 034 public class DestroyTest 035 extends BaseTestCase 036 { 037 private static TurbineConfig tc = null; 038 039 public DestroyTest(String name) 040 throws Exception 041 { 042 super(name); 043 tc = new TurbineConfig(".", "/conf/test/TemplateService.properties"); 044 } 045 046 public void testDestroy() 047 throws Exception 048 { 049 Turbine t = new Turbine(); 050 t.destroy(); 051 } 052 053 public void testInitAndDestroy() 054 throws Exception 055 { 056 tc.initialize(); 057 tc.dispose(); 058 } 059 }