• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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$
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     String TEST_COMPARE_DIR = System.getProperty("test.compare.dir");
36 
37     /**
38      * Directory relative to the distribution root, where the
39      * test cases should put their output
40      */
41     String TEST_RESULT_DIR = System.getProperty("test.result.dir");
42 
43 
44     /**
45      * VTL file extension.
46      */
47     String TMPL_FILE_EXT = "vm";
48 
49     /**
50      * Comparison file extension.
51      */
52     String CMP_FILE_EXT = "cmp";
53 
54     /**
55      * Comparison file extension.
56      */
57     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     String FILE_RESOURCE_LOADER_PATH =
64                           TEST_COMPARE_DIR + "/templates";
65 
66     /**
67      * Properties file that lists which template tests to run.
68      */
69     String TEST_CASE_PROPERTIES =
70                           FILE_RESOURCE_LOADER_PATH + "/templates.properties";
71 
72     /**
73      * Results relative to the build directory.
74      */
75     String RESULT_DIR =
76                           TEST_RESULT_DIR + "/templates";
77 
78     /**
79      * Results relative to the build directory.
80      */
81     String COMPARE_DIR =
82                           FILE_RESOURCE_LOADER_PATH + "/compare";
83 
84 }
85