View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.doxia.sink.impl;
20  
21  import org.apache.maven.doxia.sink.SinkEventAttributes;
22  import org.junit.jupiter.api.Test;
23  
24  /**
25   *
26   * @author ltheussl
27   */
28  public class SinkAdapterTest {
29      private final SinkAdapter instance = new SinkAdapter();
30  
31      /**
32       * Test of head method, of class SinkAdapter.
33       */
34      @Test
35      public void testHead() {
36          instance.head();
37          instance.head(null);
38          instance.head_();
39      }
40  
41      /**
42       * Test of body method, of class SinkAdapter.
43       */
44      @Test
45      public void testBody() {
46          instance.body();
47          instance.body(null);
48          instance.body_();
49      }
50  
51      /**
52       * Test of article method, of class SinkAdapter.
53       */
54      @Test
55      public void testArticle() {
56          instance.article();
57          instance.article(null);
58          instance.article_();
59      }
60  
61      /**
62       * Test of navigation method, of class SinkAdapter.
63       */
64      @Test
65      public void testNavigation() {
66          instance.navigation();
67          instance.navigation(null);
68          instance.navigation_();
69      }
70  
71      /**
72       * Test of sidebar method, of class SinkAdapter.
73       */
74      @Test
75      public void testSidebar() {
76          instance.sidebar();
77          instance.sidebar(null);
78          instance.sidebar_();
79      }
80  
81      /**
82       * Test of section1 method, of class SinkAdapter.
83       */
84      @Test
85      public void testSection1() {
86          final int level = SinkAdapter.SECTION_LEVEL_1;
87          instance.section1();
88          instance.section1_();
89          instance.section(level, null);
90          instance.section_(level);
91      }
92  
93      /**
94       * Test of section2 method, of class SinkAdapter.
95       */
96      @Test
97      public void testSection2() {
98          final int level = SinkAdapter.SECTION_LEVEL_2;
99          instance.section2();
100         instance.section2_();
101         instance.section(level, null);
102         instance.section_(level);
103     }
104 
105     /**
106      * Test of section3 method, of class SinkAdapter.
107      */
108     @Test
109     public void testSection3() {
110         final int level = SinkAdapter.SECTION_LEVEL_3;
111         instance.section3();
112         instance.section3_();
113         instance.section(level, null);
114         instance.section_(level);
115     }
116 
117     /**
118      * Test of section4 method, of class SinkAdapter.
119      */
120     @Test
121     public void testSection4() {
122         final int level = SinkAdapter.SECTION_LEVEL_4;
123         instance.section4();
124         instance.section4_();
125         instance.section(level, null);
126         instance.section_(level);
127     }
128 
129     /**
130      * Test of section5 method, of class SinkAdapter.
131      */
132     @Test
133     public void testSection5() {
134         final int level = SinkAdapter.SECTION_LEVEL_5;
135         instance.section5();
136         instance.section5_();
137         instance.section(level, null);
138         instance.section_(level);
139     }
140 
141     /**
142      * Test of list method, of class SinkAdapter.
143      */
144     @Test
145     public void testList() {
146         instance.list();
147         instance.list(null);
148         instance.list_();
149     }
150 
151     /**
152      * Test of listItem method, of class SinkAdapter.
153      */
154     @Test
155     public void testListItem() {
156         instance.listItem();
157         instance.listItem(null);
158         instance.listItem_();
159     }
160 
161     /**
162      * Test of numberedList method, of class SinkAdapter.
163      */
164     @Test
165     public void testNumberedList() {
166         final int numbering = SinkAdapter.NUMBERING_DECIMAL;
167         instance.numberedList(numbering);
168         instance.numberedList(numbering, null);
169         instance.numberedList_();
170     }
171 
172     /**
173      * Test of numberedListItem method, of class SinkAdapter.
174      */
175     @Test
176     public void testNumberedListItem() {
177         instance.numberedListItem();
178         instance.numberedListItem(null);
179         instance.numberedListItem_();
180     }
181 
182     /**
183      * Test of definitionList method, of class SinkAdapter.
184      */
185     @Test
186     public void testDefinitionList() {
187         instance.definitionList();
188         instance.definitionList(null);
189         instance.definitionList_();
190     }
191 
192     /**
193      * Test of definitionListItem method, of class SinkAdapter.
194      */
195     @Test
196     public void testDefinitionListItem() {
197         instance.definitionListItem();
198         instance.definitionListItem(null);
199         instance.definitionListItem_();
200     }
201 
202     /**
203      * Test of definition method, of class SinkAdapter.
204      */
205     @Test
206     public void testDefinition() {
207         instance.definition();
208         instance.definition(null);
209         instance.definition_();
210     }
211 
212     /**
213      * Test of figure method, of class SinkAdapter.
214      */
215     @Test
216     public void testFigure() {
217         instance.figure();
218         instance.figure(null);
219         instance.figure_();
220     }
221 
222     /**
223      * Test of table method, of class SinkAdapter.
224      */
225     @Test
226     public void testTable() {
227         instance.table();
228         instance.table(null);
229         instance.table_();
230     }
231 
232     /**
233      * Test of tableRows method, of class SinkAdapter.
234      */
235     @Test
236     public void testTableRows() {
237         instance.tableRows();
238         instance.tableRows_();
239     }
240 
241     /**
242      * Test of tableRow method, of class SinkAdapter.
243      */
244     @Test
245     public void testTableRow() {
246         instance.tableRow();
247         instance.tableRow(null);
248         instance.tableRow_();
249     }
250 
251     /**
252      * Test of title method, of class SinkAdapter.
253      */
254     @Test
255     public void testTitle() {
256         instance.title();
257         instance.title(null);
258         instance.title_();
259     }
260 
261     /**
262      * Test of author method, of class SinkAdapter.
263      */
264     @Test
265     public void testAuthor() {
266         instance.author();
267         instance.author(null);
268         instance.author_();
269     }
270 
271     /**
272      * Test of date method, of class SinkAdapter.
273      */
274     @Test
275     public void testDate() {
276         instance.date();
277         instance.date(null);
278         instance.date_();
279     }
280 
281     /**
282      * Test of sectionTitle method, of class SinkAdapter.
283      */
284     @Test
285     public void testSectionTitle() {
286         final int level = SinkAdapter.SECTION_LEVEL_1;
287         instance.sectionTitle();
288         instance.sectionTitle_();
289         instance.sectionTitle(level, null);
290         instance.sectionTitle_(level);
291     }
292 
293     /**
294      * Test of sectionTitle1 method, of class SinkAdapter.
295      */
296     @Test
297     public void testSectionTitle1() {
298         final int level = SinkAdapter.SECTION_LEVEL_1;
299         instance.sectionTitle1();
300         instance.sectionTitle1_();
301         instance.sectionTitle(level, null);
302         instance.sectionTitle_(level);
303     }
304 
305     /**
306      * Test of sectionTitle2 method, of class SinkAdapter.
307      */
308     @Test
309     public void testSectionTitle2() {
310         final int level = SinkAdapter.SECTION_LEVEL_2;
311         instance.sectionTitle2();
312         instance.sectionTitle2_();
313         instance.sectionTitle(level, null);
314         instance.sectionTitle_(level);
315     }
316 
317     /**
318      * Test of sectionTitle3 method, of class SinkAdapter.
319      */
320     @Test
321     public void testSectionTitle3() {
322         final int level = SinkAdapter.SECTION_LEVEL_3;
323         instance.sectionTitle3();
324         instance.sectionTitle3_();
325         instance.sectionTitle(level, null);
326         instance.sectionTitle_(level);
327     }
328 
329     /**
330      * Test of sectionTitle4 method, of class SinkAdapter.
331      */
332     @Test
333     public void testSectionTitle4() {
334         final int level = SinkAdapter.SECTION_LEVEL_4;
335         instance.sectionTitle4();
336         instance.sectionTitle4_();
337         instance.sectionTitle(level, null);
338         instance.sectionTitle_(level);
339     }
340 
341     /**
342      * Test of sectionTitle5 method, of class SinkAdapter.
343      */
344     @Test
345     public void testSectionTitle5() {
346         final int level = SinkAdapter.SECTION_LEVEL_5;
347         instance.sectionTitle5();
348         instance.sectionTitle5_();
349         instance.sectionTitle(level, null);
350         instance.sectionTitle_(level);
351     }
352 
353     /**
354      * Test of header method, of class SinkAdapter.
355      */
356     @Test
357     public void testHeader() {
358         instance.header();
359         instance.header(null);
360         instance.header_();
361     }
362 
363     /**
364      * Test of content method, of class SinkAdapter.
365      */
366     @Test
367     public void testContent() {
368         instance.content();
369         instance.content(null);
370         instance.content_();
371     }
372 
373     /**
374      * Test of footer method, of class SinkAdapter.
375      */
376     @Test
377     public void testFooter() {
378         instance.footer();
379         instance.footer(null);
380         instance.footer_();
381     }
382 
383     /**
384      * Test of paragraph method, of class SinkAdapter.
385      */
386     @Test
387     public void testParagraph() {
388         instance.paragraph();
389         instance.paragraph(null);
390         instance.paragraph_();
391     }
392 
393     /**
394      * Test of data method, of class SinkAdapter.
395      */
396     @Test
397     public void testData() {
398         String value = "";
399         instance.data(value);
400         instance.data(value, null);
401         instance.data_();
402     }
403 
404     /**
405      * Test of time method, of class SinkAdapter.
406      */
407     @Test
408     public void testTime() {
409         String datetime = "";
410         instance.time(datetime);
411         instance.time(datetime, null);
412         instance.time_();
413     }
414 
415     /**
416      * Test of address method, of class SinkAdapter.
417      */
418     @Test
419     public void testAddress() {
420         instance.address();
421         instance.address(null);
422         instance.address_();
423     }
424 
425     /**
426      * Test of blockquote method, of class SinkAdapter.
427      */
428     @Test
429     public void testBlockquote() {
430         instance.blockquote();
431         instance.blockquote(null);
432         instance.blockquote_();
433     }
434 
435     /**
436      * Test of division method, of class SinkAdapter.
437      */
438     @Test
439     public void testDivision() {
440         instance.division();
441         instance.division(null);
442         instance.division_();
443     }
444 
445     /**
446      * Test of verbatim method, of class SinkAdapter.
447      */
448     @Test
449     public void testVerbatim() {
450         instance.verbatim(null);
451         instance.verbatim_();
452     }
453 
454     /**
455      * Test of definedTerm method, of class SinkAdapter.
456      */
457     @Test
458     public void testDefinedTerm() {
459         instance.definedTerm();
460         instance.definedTerm(null);
461         instance.definedTerm_();
462     }
463 
464     /**
465      * Test of figureCaption method, of class SinkAdapter.
466      */
467     @Test
468     public void testFigureCaption() {
469         instance.figureCaption();
470         instance.figureCaption(null);
471         instance.figureCaption_();
472     }
473 
474     /**
475      * Test of tableCell method, of class SinkAdapter.
476      */
477     @Test
478     public void testTableCell() {
479         instance.tableCell();
480         instance.tableCell((SinkEventAttributes) null);
481         instance.tableCell_();
482     }
483 
484     /**
485      * Test of tableCaption method, of class SinkAdapter.
486      */
487     @Test
488     public void testTableCaption() {
489         instance.tableCaption();
490         instance.tableCaption(null);
491         instance.tableCaption_();
492     }
493 
494     /**
495      * Test of figureGraphics method, of class SinkAdapter.
496      */
497     @Test
498     public void testFigureGraphics() {
499         String name = "";
500         instance.figureGraphics(name);
501         instance.figureGraphics(name, null);
502     }
503 
504     /**
505      * Test of horizontalRule method, of class SinkAdapter.
506      */
507     @Test
508     public void testHorizontalRule() {
509         instance.horizontalRule();
510         instance.horizontalRule(null);
511     }
512 
513     /**
514      * Test of pageBreak method, of class SinkAdapter.
515      */
516     @Test
517     public void testPageBreak() {
518         instance.pageBreak();
519     }
520 
521     /**
522      * Test of anchor method, of class SinkAdapter.
523      */
524     @Test
525     public void testAnchor() {
526         String name = "";
527         instance.anchor(name);
528         instance.anchor(name, null);
529         instance.anchor_();
530     }
531 
532     /**
533      * Test of link method, of class SinkAdapter.
534      */
535     @Test
536     public void testLink() {
537         String name = "";
538         instance.link(name);
539         instance.link(name, null);
540         instance.link_();
541     }
542 
543     /**
544      * Test of inline method, of class SinkAdapter.
545      */
546     @Test
547     public void testInline() {
548         instance.inline();
549         instance.inline(null);
550         instance.inline_();
551     }
552 
553     /**
554      * Test of italic method, of class SinkAdapter.
555      */
556     @Test
557     public void testItalic() {
558         instance.inline(SinkEventAttributeSet.Semantics.ITALIC);
559         instance.inline_();
560     }
561 
562     /**
563      * Test of bold method, of class SinkAdapter.
564      */
565     @Test
566     public void testBold() {
567         instance.inline(SinkEventAttributeSet.Semantics.BOLD);
568         instance.inline_();
569     }
570 
571     /**
572      * Test of monospaced method, of class SinkAdapter.
573      */
574     @Test
575     public void testMonospaced() {
576         instance.inline(SinkEventAttributeSet.Semantics.MONOSPACED);
577         instance.inline_();
578     }
579 
580     /**
581      * Test of lineBreak method, of class SinkAdapter.
582      */
583     @Test
584     public void testLineBreaks() {
585         instance.lineBreak();
586         instance.lineBreak(null);
587     }
588 
589     /**
590      * Test of lineBreakOpportunity method, of class SinkAdapter.
591      */
592     @Test
593     public void testLineBreakOpportunities() {
594         instance.lineBreakOpportunity();
595         instance.lineBreakOpportunity(null);
596     }
597 
598     /**
599      * Test of nonBreakingSpace method, of class SinkAdapter.
600      */
601     @Test
602     public void testNonBreakingSpace() {
603         instance.nonBreakingSpace();
604     }
605 
606     /**
607      * Test of text method, of class SinkAdapter.
608      */
609     @Test
610     public void testText() {
611         String text = "";
612         instance.text(text);
613         instance.text(text, null);
614     }
615 
616     /**
617      * Test of rawText method, of class SinkAdapter.
618      */
619     @Test
620     public void testRawText() {
621         String text = "";
622         instance.rawText(text);
623     }
624 
625     /**
626      * Test of comment method, of class SinkAdapter.
627      */
628     @Test
629     public void testComment() {
630         instance.comment("");
631     }
632 
633     /**
634      * Test of flush method, of class SinkAdapter.
635      */
636     @Test
637     public void testFlush() {
638         instance.flush();
639     }
640 
641     /**
642      * Test of close method, of class SinkAdapter.
643      */
644     @Test
645     public void testClose() {
646         instance.close();
647     }
648 
649     /**
650      * Test of section method, of class SinkAdapter.
651      */
652     @Test
653     public void testSection() {
654         int level = 0;
655         instance.section(level, null);
656         instance.section_(level);
657     }
658 
659     /**
660      * Test of unknown method, of class SinkAdapter.
661      */
662     @Test
663     public void testUnknown() {
664         String name = "";
665         Object[] requiredParams = null;
666         instance.unknown(name, requiredParams, null);
667     }
668 }