View Javadoc

1   package org.apache.maven.doxia.sink;
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  import junit.framework.TestCase;
23  
24  /**
25   *
26   * @author ltheussl
27   */
28  public class SinkAdapterTest
29          extends TestCase
30  {
31      private final SinkAdapter instance = new SinkAdapter();
32  
33      /**
34       * Test of head method, of class SinkAdapter.
35       */
36      public void testHead()
37      {
38          instance.head();
39          instance.head( null );
40          instance.head_();
41      }
42  
43      /**
44       * Test of body method, of class SinkAdapter.
45       */
46      public void testBody()
47      {
48          instance.body();
49          instance.body( null );
50          instance.body_();
51      }
52  
53      /**
54       * Test of section1 method, of class SinkAdapter.
55       */
56      public void testSection1()
57      {
58          final int level = SinkAdapter.SECTION_LEVEL_1;
59          instance.section1();
60          instance.section1_();
61          instance.section( level, null );
62          instance.section_( level );
63      }
64  
65      /**
66       * Test of section2 method, of class SinkAdapter.
67       */
68      public void testSection2()
69      {
70          final int level = SinkAdapter.SECTION_LEVEL_2;
71          instance.section2();
72          instance.section2_();
73          instance.section( level, null );
74          instance.section_( level );
75      }
76  
77      /**
78       * Test of section3 method, of class SinkAdapter.
79       */
80      public void testSection3()
81      {
82          final int level = SinkAdapter.SECTION_LEVEL_3;
83          instance.section3();
84          instance.section3_();
85          instance.section( level, null );
86          instance.section_( level );
87      }
88  
89      /**
90       * Test of section4 method, of class SinkAdapter.
91       */
92      public void testSection4()
93      {
94          final int level = SinkAdapter.SECTION_LEVEL_4;
95          instance.section4();
96          instance.section4_();
97          instance.section( level, null );
98          instance.section_( level );
99      }
100 
101     /**
102      * Test of section5 method, of class SinkAdapter.
103      */
104     public void testSection5()
105     {
106         final int level = SinkAdapter.SECTION_LEVEL_5;
107         instance.section5();
108         instance.section5_();
109         instance.section( level, null );
110         instance.section_( level );
111     }
112 
113     /**
114      * Test of list method, of class SinkAdapter.
115      */
116     public void testList()
117     {
118         instance.list();
119         instance.list( null );
120         instance.list_();
121     }
122 
123     /**
124      * Test of listItem method, of class SinkAdapter.
125      */
126     public void testListItem()
127     {
128         instance.listItem();
129         instance.listItem( null );
130         instance.listItem_();
131     }
132 
133     /**
134      * Test of numberedList method, of class SinkAdapter.
135      */
136     public void testNumberedList()
137     {
138         final int numbering = SinkAdapter.NUMBERING_DECIMAL;
139         instance.numberedList( numbering );
140         instance.numberedList( numbering, null );
141         instance.numberedList_();
142     }
143 
144     /**
145      * Test of numberedListItem method, of class SinkAdapter.
146      */
147     public void testNumberedListItem()
148     {
149         instance.numberedListItem();
150         instance.numberedListItem( null );
151         instance.numberedListItem_();
152     }
153 
154     /**
155      * Test of definitionList method, of class SinkAdapter.
156      */
157     public void testDefinitionList()
158     {
159         instance.definitionList();
160         instance.definitionList( null );
161         instance.definitionList_();
162     }
163 
164     /**
165      * Test of definitionListItem method, of class SinkAdapter.
166      */
167     public void testDefinitionListItem()
168     {
169         instance.definitionListItem();
170         instance.definitionListItem( null );
171         instance.definitionListItem_();
172     }
173 
174     /**
175      * Test of definition method, of class SinkAdapter.
176      */
177     public void testDefinition()
178     {
179         instance.definition();
180         instance.definition( null );
181         instance.definition_();
182     }
183 
184     /**
185      * Test of figure method, of class SinkAdapter.
186      */
187     public void testFigure()
188     {
189         instance.figure();
190         instance.figure( null );
191         instance.figure_();
192     }
193 
194     /**
195      * Test of table method, of class SinkAdapter.
196      */
197     public void testTable()
198     {
199         instance.table();
200         instance.table( null );
201         instance.table_();
202     }
203 
204     /**
205      * Test of tableRows method, of class SinkAdapter.
206      */
207     public void testTableRows()
208     {
209         final int[] justification = null;
210         final boolean grid = false;
211         instance.tableRows( justification, grid );
212         instance.tableRows_();
213     }
214 
215     /**
216      * Test of tableRow method, of class SinkAdapter.
217      */
218     public void testTableRow()
219     {
220         instance.tableRow();
221         instance.tableRow( null );
222         instance.tableRow_();
223     }
224 
225     /**
226      * Test of title method, of class SinkAdapter.
227      */
228     public void testTitle()
229     {
230         instance.title();
231         instance.title( null );
232         instance.title_();
233     }
234 
235     /**
236      * Test of author method, of class SinkAdapter.
237      */
238     public void testAuthor()
239     {
240         instance.author();
241         instance.author( null );
242         instance.author_();
243     }
244 
245     /**
246      * Test of date method, of class SinkAdapter.
247      */
248     public void testDate()
249     {
250         instance.date();
251         instance.date( null );
252         instance.date_();
253     }
254 
255     /**
256      * Test of sectionTitle method, of class SinkAdapter.
257      */
258     public void testSectionTitle()
259     {
260         final int level = SinkAdapter.SECTION_LEVEL_1;
261         instance.sectionTitle();
262         instance.sectionTitle_();
263         instance.sectionTitle( level, null );
264         instance.sectionTitle_( level );
265     }
266 
267     /**
268      * Test of sectionTitle1 method, of class SinkAdapter.
269      */
270     public void testSectionTitle1()
271     {
272         final int level = SinkAdapter.SECTION_LEVEL_1;
273         instance.sectionTitle1();
274         instance.sectionTitle1_();
275         instance.sectionTitle( level, null );
276         instance.sectionTitle_( level );
277     }
278 
279     /**
280      * Test of sectionTitle2 method, of class SinkAdapter.
281      */
282     public void testSectionTitle2()
283     {
284         final int level = SinkAdapter.SECTION_LEVEL_2;
285         instance.sectionTitle2();
286         instance.sectionTitle2_();
287         instance.sectionTitle( level, null );
288         instance.sectionTitle_( level );
289     }
290 
291     /**
292      * Test of sectionTitle3 method, of class SinkAdapter.
293      */
294     public void testSectionTitle3()
295     {
296         final int level = SinkAdapter.SECTION_LEVEL_3;
297         instance.sectionTitle3();
298         instance.sectionTitle3_();
299         instance.sectionTitle( level, null );
300         instance.sectionTitle_( level );
301     }
302 
303     /**
304      * Test of sectionTitle4 method, of class SinkAdapter.
305      */
306     public void testSectionTitle4()
307     {
308         final int level = SinkAdapter.SECTION_LEVEL_4;
309         instance.sectionTitle4();
310         instance.sectionTitle4_();
311         instance.sectionTitle( level, null );
312         instance.sectionTitle_( level );
313     }
314 
315     /**
316      * Test of sectionTitle5 method, of class SinkAdapter.
317      */
318     public void testSectionTitle5()
319     {
320         final int level = SinkAdapter.SECTION_LEVEL_5;
321         instance.sectionTitle5();
322         instance.sectionTitle5_();
323         instance.sectionTitle( level, null );
324         instance.sectionTitle_( level );
325     }
326 
327     /**
328      * Test of paragraph method, of class SinkAdapter.
329      */
330     public void testParagraph()
331     {
332         instance.paragraph();
333         instance.paragraph( null );
334         instance.paragraph_();
335     }
336 
337     /**
338      * Test of verbatim method, of class SinkAdapter.
339      */
340     public void testVerbatim()
341     {
342         instance.verbatim( null );
343         instance.verbatim( false );
344         instance.verbatim_();
345     }
346 
347     /**
348      * Test of definedTerm method, of class SinkAdapter.
349      */
350     public void testDefinedTerm()
351     {
352         instance.definedTerm();
353         instance.definedTerm( null );
354         instance.definedTerm_();
355     }
356 
357     /**
358      * Test of figureCaption method, of class SinkAdapter.
359      */
360     public void testFigureCaption()
361     {
362         instance.figureCaption();
363         instance.figureCaption( null );
364         instance.figureCaption_();
365     }
366 
367     /**
368      * Test of tableCell method, of class SinkAdapter.
369      */
370     public void testTableCell()
371     {
372         instance.tableCell();
373         instance.tableCell( (SinkEventAttributes) null );
374         instance.tableCell( (String) null );
375         instance.tableCell_();
376     }
377 
378     /**
379      * Test of tableHeaderCell method, of class SinkAdapter.
380      */
381     public void testTableHeaderCell()
382     {
383         instance.tableHeaderCell();
384         instance.tableHeaderCell( (SinkEventAttributes) null );
385         instance.tableHeaderCell( (String) null );
386         instance.tableHeaderCell_();
387     }
388 
389     /**
390      * Test of tableCaption method, of class SinkAdapter.
391      */
392     public void testTableCaption()
393     {
394         instance.tableCaption();
395         instance.tableCaption( null );
396         instance.tableCaption_();
397     }
398 
399     /**
400      * Test of figureGraphics method, of class SinkAdapter.
401      */
402     public void testFigureGraphics()
403     {
404         String name = "";
405         instance.figureGraphics( name );
406         instance.figureGraphics( name, null );
407     }
408 
409     /**
410      * Test of horizontalRule method, of class SinkAdapter.
411      */
412     public void testHorizontalRule()
413     {
414         instance.horizontalRule();
415         instance.horizontalRule( null );
416     }
417 
418     /**
419      * Test of pageBreak method, of class SinkAdapter.
420      */
421     public void testPageBreak()
422     {
423         instance.pageBreak();
424     }
425 
426     /**
427      * Test of anchor method, of class SinkAdapter.
428      */
429     public void testAnchor()
430     {
431         String name = "";
432         instance.anchor( name );
433         instance.anchor( name, null );
434         instance.anchor_();
435     }
436 
437     /**
438      * Test of link method, of class SinkAdapter.
439      */
440     public void testLink()
441     {
442         String name = "";
443         instance.link( name );
444         instance.link( name, null );
445         instance.link_();
446     }
447 
448     /**
449      * Test of italic method, of class SinkAdapter.
450      */
451     public void testItalic()
452     {
453         instance.italic();
454         instance.italic_();
455     }
456 
457     /**
458      * Test of bold method, of class SinkAdapter.
459      */
460     public void testBold()
461     {
462         instance.bold();
463         instance.bold_();
464     }
465 
466     /**
467      * Test of monospaced method, of class SinkAdapter.
468      */
469     public void testMonospaced()
470     {
471         instance.monospaced();
472         instance.monospaced_();
473     }
474 
475     /**
476      * Test of lineBreak method, of class SinkAdapter.
477      */
478     public void testLineBreaks()
479     {
480         instance.lineBreak();
481         instance.lineBreak( null );
482     }
483 
484     /**
485      * Test of nonBreakingSpace method, of class SinkAdapter.
486      */
487     public void testNonBreakingSpace()
488     {
489         instance.nonBreakingSpace();
490     }
491 
492     /**
493      * Test of text method, of class SinkAdapter.
494      */
495     public void testText()
496     {
497         String text = "";
498         instance.text( text );
499         instance.text( text, null );
500     }
501 
502     /**
503      * Test of rawText method, of class SinkAdapter.
504      */
505     public void testRawText()
506     {
507         String text = "";
508         instance.rawText( text );
509     }
510 
511     /**
512      * Test of comment method, of class SinkAdapter.
513      */
514     public void testComment()
515     {
516         instance.comment( "" );
517     }
518 
519     /**
520      * Test of flush method, of class SinkAdapter.
521      */
522     public void testFlush()
523     {
524         instance.flush();
525     }
526 
527     /**
528      * Test of close method, of class SinkAdapter.
529      */
530     public void testClose()
531     {
532         instance.close();
533     }
534 
535     /**
536      * Test of section method, of class SinkAdapter.
537      */
538     public void testSection()
539     {
540         int level = 0;
541         instance.section( level, null );
542         instance.section_( level );
543     }
544 
545     /**
546      * Test of unknown method, of class SinkAdapter.
547      */
548     public void testUnknown()
549     {
550         String name = "";
551         Object[] requiredParams = null;
552         instance.unknown( name, requiredParams, null );
553     }
554 }