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   * @author timp
13   * @since 26 Jun 2007
14   *
15   */
16  public class HTMLMarkupLanguageNoTemplateEngineTest extends
17     HTMLMarkupLanguageSpec {
18  
19    /**
20     * Constructor.
21     */
22    public HTMLMarkupLanguageNoTemplateEngineTest() {
23      super();
24    }
25  
26    /** 
27     * {@inheritDoc}
28     * @see org.melati.template.test.MarkupLanguageSpec#setUp()
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     * Test method for getName.
41     * 
42     * @see org.melati.template.MarkupLanguage#getName()
43     */
44    public void testGetName() {
45      assertEquals("html", ml.getName());
46      assertEquals("html_attr", aml.getName());
47    }
48  
49    /** 
50     * {@inheritDoc}
51     * @see org.melati.template.test.HTMLMarkupLanguageWebmacroTest#testRenderedTreeable()
52     */
53    public void testRenderedTreeable() throws Exception {
54      try { 
55        super.testRenderedTreeable();
56        fail("Should have bombed");
57      } catch (TemplateEngineException e) { 
58        assertEquals("The template " + 
59                "org/melati/template/none/templets/html/org.melati.util.JSStaticTree.none" +  
60                " could not be found because you have not configured a template engine.", e.getMessage());
61      }
62    }
63  
64  
65    /** 
66     * {@inheritDoc}
67     * @see org.melati.template.test.MarkupLanguageSpec#testEncoded()
68     */
69    public void testEncoded() {
70      super.testEncoded();
71    }
72  
73    /** 
74     * {@inheritDoc}
75     * @see org.melati.template.test.MarkupLanguageSpec#testEntitySubstitution()
76     */
77    public void testEntitySubstitution() throws Exception {
78      super.testEntitySubstitution();
79    }
80  
81    /** 
82     * {@inheritDoc}
83     * @see org.melati.template.test.MarkupLanguageSpec#testEscapedPersistent()
84     */
85    public void testEscapedPersistent() {
86      super.testEscapedPersistent();
87    }
88  
89    /** 
90     * {@inheritDoc}
91     * @see org.melati.template.test.MarkupLanguageSpec#testEscapedString()
92     */
93    public void testEscapedString() throws Exception {
94      super.testEscapedString();
95    }
96  
97    /** 
98     * {@inheritDoc}
99     * @see org.melati.template.test.MarkupLanguageSpec#testGetAttr()
100    */
101   public void testGetAttr() {
102     super.testGetAttr();
103   }
104 
105   /** 
106    * {@inheritDoc}
107    * @see org.melati.template.test.MarkupLanguageSpec#testHTMLMarkupLanguageMelatiTempletLoaderPoemLocale()
108    */
109   public void testHTMLMarkupLanguageMelatiTempletLoaderPoemLocale() {
110     super.testHTMLMarkupLanguageMelatiTempletLoaderPoemLocale();
111   }
112 
113   /** 
114    * {@inheritDoc}
115    * @see org.melati.template.test.MarkupLanguageSpec#testHTMLMarkupLanguageStringHTMLMarkupLanguage()
116    */
117   public void testHTMLMarkupLanguageStringHTMLMarkupLanguage() {
118     super.testHTMLMarkupLanguageStringHTMLMarkupLanguage();
119   }
120 
121   /** 
122    * {@inheritDoc}
123    * @see org.melati.template.test.MarkupLanguageSpec#testInputAs()
124    */
125   public void testInputAs() throws Exception {
126     try { 
127       super.testInputAs();
128     } catch (TemplateEngineException e) { 
129       assertEquals("The template " + 
130               "org/melati/template/none/templets/html/org.melati.poem.StringPoemType.none" +  
131               " could not be found because you have not configured a template engine.", e.getMessage());
132     }
133   }
134 
135   /** 
136    * {@inheritDoc}
137    * @see org.melati.template.test.MarkupLanguageSpec#testInputField()
138    */
139   public void testInputField() throws Exception {
140     try { 
141       super.testInputField();
142     } catch (TemplateEngineException e) { 
143       assertEquals("The template " + 
144               "org/melati/template/none/templets/html/org.melati.poem.StringPoemType.none" +  
145               " could not be found because you have not configured a template engine.", e.getMessage());
146     }
147   }
148 
149   /** 
150    * {@inheritDoc}
151    * @see org.melati.template.test.MarkupLanguageSpec#testNull()
152    */
153   public void testNull() throws Exception {
154     super.testNull();
155   }
156 
157   /** 
158    * {@inheritDoc}
159    * @see org.melati.template.test.MarkupLanguageSpec#testRenderedAccessPoemException()
160    */
161   public void testRenderedAccessPoemException() throws Exception {
162     try { 
163       super.testRenderedAccessPoemException();
164     } catch (TemplateEngineException e) { 
165       assertEquals("The template " + 
166               "org/melati/template/none/templets/html/org.melati.poem.AccessPoemException.none" +  
167               " could not be found because you have not configured a template engine.", e.getMessage());
168     }
169   }
170 
171   /** 
172    * {@inheritDoc}
173    * @see org.melati.template.test.MarkupLanguageSpec#testRenderedField()
174    */
175   public void testRenderedField() throws Exception {
176     super.testRenderedField();
177   }
178 
179   /** 
180    * {@inheritDoc}
181    * @see org.melati.template.test.MarkupLanguageSpec#testRenderedFieldInt()
182    */
183   public void testRenderedFieldInt() throws Exception {
184     super.testRenderedFieldInt();
185   }
186 
187   /** 
188    * {@inheritDoc}
189    * @see org.melati.template.test.MarkupLanguageSpec#testRenderedFieldIntInt()
190    */
191   public void testRenderedFieldIntInt() throws Exception {
192     super.testRenderedFieldIntInt();
193   }
194 
195   /** 
196    * {@inheritDoc}
197    * @see org.melati.template.test.MarkupLanguageSpec#testRenderedObject()
198    */
199   public void testRenderedObject() throws Exception {
200     try { 
201       super.testRenderedObject();
202     } catch (TemplateEngineException e) { 
203       assertEquals("The template " + 
204               "org/melati/template/none/templets/html/java.lang.Integer.none" +  
205               " could not be found because you have not configured a template engine.", e.getMessage());
206     }
207   }
208 
209   /** 
210    * {@inheritDoc}
211    * @see org.melati.template.test.MarkupLanguageSpec#testRenderedStart()
212    */
213   public void testRenderedStart() throws Exception {
214     super.testRenderedStart();
215   }
216 
217   /** 
218    * {@inheritDoc}
219    * @see org.melati.template.test.MarkupLanguageSpec#testRenderedString()
220    */
221   public void testRenderedString() throws Exception {
222     super.testRenderedString();
223   }
224 
225   /** 
226    * {@inheritDoc}
227    * @see org.melati.template.test.MarkupLanguageSpec#testRenderedStringInt()
228    */
229   public void testRenderedStringInt() throws Exception {
230     super.testRenderedStringInt();
231   }
232 
233   /** 
234    * {@inheritDoc}
235    * @see org.melati.template.test.MarkupLanguageSpec#testSearchInput()
236    */
237   public void testSearchInput() throws Exception {
238     try { 
239       super.testSearchInput();
240     } catch (TemplateEngineException e) { 
241       assertEquals("The template " + 
242               "org/melati/template/none/templets/html/org.melati.poem.StringPoemType.none" +  
243               " could not be found because you have not configured a template engine.", e.getMessage());
244     }
245   }
246 
247   /** 
248    * {@inheritDoc}
249    * @see org.melati.template.test.MarkupLanguageSpec#testSpecialTemplateFound()
250    */
251   public void testSpecialTemplateFound() throws Exception {
252     try { 
253       super.testSpecialTemplateFound();
254     } catch (TemplateEngineException e) { 
255       assertEquals("The template " + 
256               "org/melati/template/none/templets/html/org.melati.poem.ReferencePoemType-SelectionWindow.none" +  
257               " could not be found because you have not configured a template engine.", e.getMessage());
258     }
259   }
260 
261   /** 
262    * {@inheritDoc}
263    * @see org.melati.template.test.MarkupLanguageSpec#testTemplateFoundOnClasspath()
264    */
265   public void testTemplateFoundOnClasspath() throws Exception {
266     try { 
267       super.testTemplateFoundOnClasspath();
268     } catch (TemplateEngineException e) { 
269       assertEquals("The template " + 
270               "org/melati/template/none/templets/html/org.melati.template.test.Templated.none" +  
271               " could not be found because you have not configured a template engine.", e.getMessage());
272     }
273   }
274 
275   /** 
276    * {@inheritDoc}
277    * @see org.melati.template.test.MarkupLanguageSpec#testUntemplatedObjectUsesToString()
278    */
279   public void testUntemplatedObjectUsesToString() throws Exception {
280     try { 
281       super.testUntemplatedObjectUsesToString();
282     } catch (TemplateEngineException e) { 
283       assertEquals("The template " + 
284               "org/melati/template/none/templets/html/java.util.Properties.none" +  
285               " could not be found because you have not configured a template engine.", e.getMessage());
286     }
287   }
288   /**
289    * Test access to password field.
290    */
291   public void testInputFieldForRestrictedField() throws Exception { 
292     try { 
293       super.testInputFieldForRestrictedField();
294     } catch (TemplateEngineException e) { 
295       assertEquals("The template " + 
296               "org/melati/template/none/templets/html/org.melati.poem.PasswordPoemType.none" +  
297               " could not be found because you have not configured a template engine.", e.getMessage());
298     }
299     
300   }
301   /**
302    * {@inheritDoc}
303    * @see org.melati.template.test.MarkupLanguageSpec#testSelectionWindowField()
304    */
305   public void testSelectionWindowField() throws Exception {
306   }
307   /** 
308    * {@inheritDoc}
309    * @see org.melati.template.test.MarkupLanguageSpec#testInputFieldSelection()
310    */
311   public void testInputFieldSelection() throws Exception {
312   }
313 
314 }