01: package org.apache.velocity.test;
02:
03: /*
04: * Licensed to the Apache Software Foundation (ASF) under one
05: * or more contributor license agreements. See the NOTICE file
06: * distributed with this work for additional information
07: * regarding copyright ownership. The ASF licenses this file
08: * to you under the Apache License, Version 2.0 (the
09: * "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: * Directory relative to the distribution root, where the
32: * values to compare test results to are stored.
33: */
34: public static final String TEST_COMPARE_DIR = "@test.dir@";
35:
36: /**
37: * Directory relative to the distribution root, where the
38: * test cases should put their output
39: */
40: public static final String TEST_RESULT_DIR = "@build.test@";
41:
42: /**
43: * VTL file extension.
44: */
45: public final static String TMPL_FILE_EXT = "vm";
46:
47: /**
48: * Comparison file extension.
49: */
50: public final static String CMP_FILE_EXT = "cmp";
51:
52: /**
53: * Comparison file extension.
54: */
55: public final static String RESULT_FILE_EXT = "res";
56:
57: /**
58: * Path for templates. This property will override the
59: * value in the default velocity properties file.
60: */
61: public final static String FILE_RESOURCE_LOADER_PATH = TEST_COMPARE_DIR
62: + "/templates";
63:
64: /**
65: * Properties file that lists which template tests to run.
66: */
67: public final static String TEST_CASE_PROPERTIES = FILE_RESOURCE_LOADER_PATH
68: + "/templates.properties";
69:
70: /**
71: * Results relative to the build directory.
72: */
73: public final static String RESULT_DIR = TEST_RESULT_DIR
74: + "/templates";
75:
76: /**
77: * Results relative to the build directory.
78: */
79: public final static String COMPARE_DIR = FILE_RESOURCE_LOADER_PATH
80: + "/compare";
81:
82: }
|