1
2
3
4 package org.melati.template.test;
5
6 import org.melati.MelatiConfig;
7 import org.melati.template.NoTemplateEngine;
8 import org.melati.template.TemplateEngineException;
9 import org.melati.util.MelatiException;
10
11
12
13
14
15
16 public class HTMLMarkupLanguageNoTemplateEngineTest extends
17 HTMLMarkupLanguageSpec {
18
19
20
21
22 public HTMLMarkupLanguageNoTemplateEngineTest() {
23 super();
24 }
25
26
27
28
29
30 protected void setUp() throws Exception {
31 super.setUp();
32 }
33
34 protected void melatiConfig() throws MelatiException {
35 mc = new MelatiConfig();
36 mc.setTemplateEngine(new NoTemplateEngine());
37 }
38
39
40
41
42
43
44 public void testGetName() {
45 assertEquals("html", ml.getName());
46 assertEquals("html_attr", aml.getName());
47 }
48
49
50
51
52
53 public void testRenderedTreeable() throws Exception {
54 try {
55 super.testRenderedTreeable();
56 fail("Should have bombed");
57 } catch (TemplateEngineException e) {
58 assertEquals("No Template engine is Configured, please specify an engine in org.melati.MelatiConfig.properties", e.getMessage());
59 }
60 }
61
62
63
64
65
66
67 public void testEncoded() {
68 super.testEncoded();
69 }
70
71
72
73
74
75 public void testEntitySubstitution() throws Exception {
76 super.testEntitySubstitution();
77 }
78
79
80
81
82
83 public void testEscapedPersistent() {
84 super.testEscapedPersistent();
85 }
86
87
88
89
90
91 public void testEscapedString() throws Exception {
92 super.testEscapedString();
93 }
94
95
96
97
98
99 public void testGetAttr() {
100 super.testGetAttr();
101 }
102
103
104
105
106
107
108 public void testInputAs() throws Exception {
109 try {
110 super.testInputAs();
111 } catch (TemplateEngineException e) {
112 assertEquals("The template " +
113 "org/melati/templets/html/org.melati.poem.StringPoemType.none" +
114 " could not be found because you have not configured a template engine.", e.getMessage());
115 }
116 }
117
118
119
120
121
122 public void testInputField() throws Exception {
123 try {
124 super.testInputField();
125 } catch (TemplateEngineException e) {
126 assertEquals("The template " +
127 "org/melati/templets/html/org.melati.poem.StringPoemType.none" +
128 " could not be found because you have not configured a template engine.", e.getMessage());
129 }
130 }
131
132
133
134
135
136 public void testNull() throws Exception {
137 super.testNull();
138 }
139
140
141
142
143
144 public void testRenderedAccessPoemException() throws Exception {
145 try {
146 super.testRenderedAccessPoemException();
147 } catch (TemplateEngineException e) {
148 assertEquals("No Template engine is Configured, please specify an engine in org.melati.MelatiConfig.properties", e.getMessage());
149 }
150 }
151
152
153
154
155
156 public void testRenderedField() throws Exception {
157 super.testRenderedField();
158 }
159
160
161
162
163
164 public void testRenderedFieldInt() throws Exception {
165 super.testRenderedFieldInt();
166 }
167
168
169
170
171
172 public void testRenderedFieldIntInt() throws Exception {
173 super.testRenderedFieldIntInt();
174 }
175
176
177
178
179
180 public void testRenderedObject() throws Exception {
181 try {
182 super.testRenderedObject();
183 } catch (TemplateEngineException e) {
184 assertEquals("No Template engine is Configured, please specify an engine in org.melati.MelatiConfig.properties", e.getMessage());
185 }
186 }
187
188
189
190
191
192 public void testRenderedStart() throws Exception {
193 super.testRenderedStart();
194 }
195
196
197
198
199
200 public void testRenderedString() throws Exception {
201 super.testRenderedString();
202 }
203
204
205
206
207
208 public void testRenderedStringInt() throws Exception {
209 super.testRenderedStringInt();
210 }
211
212
213
214
215
216 public void testSearchInput() throws Exception {
217 try {
218 super.testSearchInput();
219 } catch (TemplateEngineException e) {
220 assertEquals("The template " +
221 "org/melati/templets/html/org.melati.poem.StringPoemType.none" +
222 " could not be found because you have not configured a template engine.", e.getMessage());
223 }
224 }
225
226
227
228
229
230 public void testSpecialTemplateFound() throws Exception {
231 try {
232 super.testSpecialTemplateFound();
233 } catch (TemplateEngineException e) {
234 assertEquals("The template " +
235 "org/melati/templets/html/org.melati.poem.ReferencePoemType-SelectionWindow.none" +
236 " could not be found because you have not configured a template engine.", e.getMessage());
237 }
238 }
239
240
241
242
243
244 public void testTemplateFoundOnClasspath() throws Exception {
245 try {
246 super.testTemplateFoundOnClasspath();
247 } catch (TemplateEngineException e) {
248 assertEquals("No Template engine is Configured, please specify an engine in org.melati.MelatiConfig.properties", e.getMessage());
249 }
250 }
251
252
253
254
255
256 public void testUntemplatedObjectUsesToString() throws Exception {
257 try {
258 super.testUntemplatedObjectUsesToString();
259 } catch (TemplateEngineException e) {
260 assertEquals("No Template engine is Configured, please specify an engine in org.melati.MelatiConfig.properties", e.getMessage());
261 }
262 }
263
264
265
266 public void testInputFieldForRestrictedField() throws Exception {
267 try {
268 super.testInputFieldForRestrictedField();
269 } catch (TemplateEngineException e) {
270 assertEquals("The template " +
271 "org/melati/templets/html/org.melati.poem.PasswordPoemType.none" +
272 " could not be found because you have not configured a template engine.", e.getMessage());
273 }
274
275 }
276
277
278
279
280 public void testSelectionWindowField() throws Exception {
281 }
282
283
284
285
286 public void testInputFieldSelection() throws Exception {
287 }
288
289 public void testRenderedList() {
290 try {
291 super.testRenderedList();
292 } catch (TemplateEngineException e) {
293 assertEquals("No Template engine is Configured, please specify an engine in org.melati.MelatiConfig.properties", e.getMessage());
294 }
295 }
296
297 }