1 package org.apache.velocity.test;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22 /**
23 * This is a base interface that contains a bunch of static final
24 * strings that are of use when testing templates.
25 *
26 * @author <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>
27 * @version $Id: TemplateTestBase.java 463298 2006-10-12 16:10:32Z henning $
28 */
29 public interface TemplateTestBase
30 {
31 /**
32 * Directory relative to the distribution root, where the
33 * values to compare test results to are stored.
34 */
35 public static final String TEST_COMPARE_DIR = "@test.dir@";
36
37 /**
38 * Directory relative to the distribution root, where the
39 * test cases should put their output
40 */
41 public static final String TEST_RESULT_DIR = "@build.test@";
42
43
44 /**
45 * VTL file extension.
46 */
47 public final static String TMPL_FILE_EXT = "vm";
48
49 /**
50 * Comparison file extension.
51 */
52 public final static String CMP_FILE_EXT = "cmp";
53
54 /**
55 * Comparison file extension.
56 */
57 public final static String RESULT_FILE_EXT = "res";
58
59 /**
60 * Path for templates. This property will override the
61 * value in the default velocity properties file.
62 */
63 public final static String FILE_RESOURCE_LOADER_PATH =
64 TEST_COMPARE_DIR + "/templates";
65
66 /**
67 * Properties file that lists which template tests to run.
68 */
69 public final static String TEST_CASE_PROPERTIES =
70 FILE_RESOURCE_LOADER_PATH + "/templates.properties";
71
72 /**
73 * Results relative to the build directory.
74 */
75 public final static String RESULT_DIR =
76 TEST_RESULT_DIR + "/templates";
77
78 /**
79 * Results relative to the build directory.
80 */
81 public final static String COMPARE_DIR =
82 FILE_RESOURCE_LOADER_PATH + "/compare";
83
84 }