View Javadoc
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("No Template engine is Configured, please specify an engine in org.melati.MelatiConfig.properties", e.getMessage());
59      }
60    }
61  
62  
63    /** 
64     * {@inheritDoc}
65     * @see org.melati.template.test.MarkupLanguageSpec#testEncoded()
66     */
67    public void testEncoded() {
68      super.testEncoded();
69    }
70  
71    /** 
72     * {@inheritDoc}
73     * @see org.melati.template.test.MarkupLanguageSpec#testEntitySubstitution()
74     */
75    public void testEntitySubstitution() throws Exception {
76      super.testEntitySubstitution();
77    }
78  
79    /** 
80     * {@inheritDoc}
81     * @see org.melati.template.test.MarkupLanguageSpec#testEscapedPersistent()
82     */
83    public void testEscapedPersistent() {
84      super.testEscapedPersistent();
85    }
86  
87    /** 
88     * {@inheritDoc}
89     * @see org.melati.template.test.MarkupLanguageSpec#testEscapedString()
90     */
91    public void testEscapedString() throws Exception {
92      super.testEscapedString();
93    }
94  
95    /** 
96     * {@inheritDoc}
97     * @see org.melati.template.test.MarkupLanguageSpec#testGetAttr()
98     */
99    public void testGetAttr() {
100     super.testGetAttr();
101   }
102 
103 
104   /** 
105    * {@inheritDoc}
106    * @see org.melati.template.test.MarkupLanguageSpec#testInputAs()
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    * {@inheritDoc}
120    * @see org.melati.template.test.MarkupLanguageSpec#testInputField()
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    * {@inheritDoc}
134    * @see org.melati.template.test.MarkupLanguageSpec#testNull()
135    */
136   public void testNull() throws Exception {
137     super.testNull();
138   }
139 
140   /** 
141    * {@inheritDoc}
142    * @see org.melati.template.test.MarkupLanguageSpec#testRenderedAccessPoemException()
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    * {@inheritDoc}
154    * @see org.melati.template.test.MarkupLanguageSpec#testRenderedField()
155    */
156   public void testRenderedField() throws Exception {
157     super.testRenderedField();
158   }
159 
160   /** 
161    * {@inheritDoc}
162    * @see org.melati.template.test.MarkupLanguageSpec#testRenderedFieldInt()
163    */
164   public void testRenderedFieldInt() throws Exception {
165     super.testRenderedFieldInt();
166   }
167 
168   /** 
169    * {@inheritDoc}
170    * @see org.melati.template.test.MarkupLanguageSpec#testRenderedFieldIntInt()
171    */
172   public void testRenderedFieldIntInt() throws Exception {
173     super.testRenderedFieldIntInt();
174   }
175 
176   /** 
177    * {@inheritDoc}
178    * @see org.melati.template.test.MarkupLanguageSpec#testRenderedObject()
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    * {@inheritDoc}
190    * @see org.melati.template.test.MarkupLanguageSpec#testRenderedStart()
191    */
192   public void testRenderedStart() throws Exception {
193     super.testRenderedStart();
194   }
195 
196   /** 
197    * {@inheritDoc}
198    * @see org.melati.template.test.MarkupLanguageSpec#testRenderedString()
199    */
200   public void testRenderedString() throws Exception {
201     super.testRenderedString();
202   }
203 
204   /** 
205    * {@inheritDoc}
206    * @see org.melati.template.test.MarkupLanguageSpec#testRenderedStringInt()
207    */
208   public void testRenderedStringInt() throws Exception {
209     super.testRenderedStringInt();
210   }
211 
212   /** 
213    * {@inheritDoc}
214    * @see org.melati.template.test.MarkupLanguageSpec#testSearchInput()
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    * {@inheritDoc}
228    * @see org.melati.template.test.MarkupLanguageSpec#testSpecialTemplateFound()
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    * {@inheritDoc}
242    * @see org.melati.template.test.MarkupLanguageSpec#testTemplateFoundOnClasspath()
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    * {@inheritDoc}
254    * @see org.melati.template.test.MarkupLanguageSpec#testUntemplatedObjectUsesToString()
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    * Test access to password field.
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    * {@inheritDoc}
278    * @see org.melati.template.test.MarkupLanguageSpec#testSelectionWindowField()
279    */
280   public void testSelectionWindowField() throws Exception {
281   }
282   /** 
283    * {@inheritDoc}
284    * @see org.melati.template.test.MarkupLanguageSpec#testInputFieldSelection()
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 }