001package org.apache.maven.doxia.sink.impl;
002
003import org.apache.maven.doxia.sink.SinkEventAttributes;
004import org.apache.maven.doxia.sink.impl.SinkAdapter;
005
006/*
007 * Licensed to the Apache Software Foundation (ASF) under one
008 * or more contributor license agreements.  See the NOTICE file
009 * distributed with this work for additional information
010 * regarding copyright ownership.  The ASF licenses this file
011 * to you under the Apache License, Version 2.0 (the
012 * "License"); you may not use this file except in compliance
013 * with the License.  You may obtain a copy of the License at
014 *
015 *   http://www.apache.org/licenses/LICENSE-2.0
016 *
017 * Unless required by applicable law or agreed to in writing,
018 * software distributed under the License is distributed on an
019 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
020 * KIND, either express or implied.  See the License for the
021 * specific language governing permissions and limitations
022 * under the License.
023 */
024
025import junit.framework.TestCase;
026
027/**
028 *
029 * @author ltheussl
030 */
031public class SinkAdapterTest
032        extends TestCase
033{
034    private final SinkAdapter instance = new SinkAdapter();
035
036    /**
037     * Test of head method, of class SinkAdapter.
038     */
039    public void testHead()
040    {
041        instance.head();
042        instance.head( null );
043        instance.head_();
044    }
045
046    /**
047     * Test of body method, of class SinkAdapter.
048     */
049    public void testBody()
050    {
051        instance.body();
052        instance.body( null );
053        instance.body_();
054    }
055
056    /**
057     * Test of section1 method, of class SinkAdapter.
058     */
059    public void testSection1()
060    {
061        final int level = SinkAdapter.SECTION_LEVEL_1;
062        instance.section1();
063        instance.section1_();
064        instance.section( level, null );
065        instance.section_( level );
066    }
067
068    /**
069     * Test of section2 method, of class SinkAdapter.
070     */
071    public void testSection2()
072    {
073        final int level = SinkAdapter.SECTION_LEVEL_2;
074        instance.section2();
075        instance.section2_();
076        instance.section( level, null );
077        instance.section_( level );
078    }
079
080    /**
081     * Test of section3 method, of class SinkAdapter.
082     */
083    public void testSection3()
084    {
085        final int level = SinkAdapter.SECTION_LEVEL_3;
086        instance.section3();
087        instance.section3_();
088        instance.section( level, null );
089        instance.section_( level );
090    }
091
092    /**
093     * Test of section4 method, of class SinkAdapter.
094     */
095    public void testSection4()
096    {
097        final int level = SinkAdapter.SECTION_LEVEL_4;
098        instance.section4();
099        instance.section4_();
100        instance.section( level, null );
101        instance.section_( level );
102    }
103
104    /**
105     * Test of section5 method, of class SinkAdapter.
106     */
107    public void testSection5()
108    {
109        final int level = SinkAdapter.SECTION_LEVEL_5;
110        instance.section5();
111        instance.section5_();
112        instance.section( level, null );
113        instance.section_( level );
114    }
115
116    /**
117     * Test of list method, of class SinkAdapter.
118     */
119    public void testList()
120    {
121        instance.list();
122        instance.list( null );
123        instance.list_();
124    }
125
126    /**
127     * Test of listItem method, of class SinkAdapter.
128     */
129    public void testListItem()
130    {
131        instance.listItem();
132        instance.listItem( null );
133        instance.listItem_();
134    }
135
136    /**
137     * Test of numberedList method, of class SinkAdapter.
138     */
139    public void testNumberedList()
140    {
141        final int numbering = SinkAdapter.NUMBERING_DECIMAL;
142        instance.numberedList( numbering );
143        instance.numberedList( numbering, null );
144        instance.numberedList_();
145    }
146
147    /**
148     * Test of numberedListItem method, of class SinkAdapter.
149     */
150    public void testNumberedListItem()
151    {
152        instance.numberedListItem();
153        instance.numberedListItem( null );
154        instance.numberedListItem_();
155    }
156
157    /**
158     * Test of definitionList method, of class SinkAdapter.
159     */
160    public void testDefinitionList()
161    {
162        instance.definitionList();
163        instance.definitionList( null );
164        instance.definitionList_();
165    }
166
167    /**
168     * Test of definitionListItem method, of class SinkAdapter.
169     */
170    public void testDefinitionListItem()
171    {
172        instance.definitionListItem();
173        instance.definitionListItem( null );
174        instance.definitionListItem_();
175    }
176
177    /**
178     * Test of definition method, of class SinkAdapter.
179     */
180    public void testDefinition()
181    {
182        instance.definition();
183        instance.definition( null );
184        instance.definition_();
185    }
186
187    /**
188     * Test of figure method, of class SinkAdapter.
189     */
190    public void testFigure()
191    {
192        instance.figure();
193        instance.figure( null );
194        instance.figure_();
195    }
196
197    /**
198     * Test of table method, of class SinkAdapter.
199     */
200    public void testTable()
201    {
202        instance.table();
203        instance.table( null );
204        instance.table_();
205    }
206
207    /**
208     * Test of tableRows method, of class SinkAdapter.
209     */
210    public void testTableRows()
211    {
212        final int[] justification = null;
213        final boolean grid = false;
214        instance.tableRows( justification, grid );
215        instance.tableRows_();
216    }
217
218    /**
219     * Test of tableRow method, of class SinkAdapter.
220     */
221    public void testTableRow()
222    {
223        instance.tableRow();
224        instance.tableRow( null );
225        instance.tableRow_();
226    }
227
228    /**
229     * Test of title method, of class SinkAdapter.
230     */
231    public void testTitle()
232    {
233        instance.title();
234        instance.title( null );
235        instance.title_();
236    }
237
238    /**
239     * Test of author method, of class SinkAdapter.
240     */
241    public void testAuthor()
242    {
243        instance.author();
244        instance.author( null );
245        instance.author_();
246    }
247
248    /**
249     * Test of date method, of class SinkAdapter.
250     */
251    public void testDate()
252    {
253        instance.date();
254        instance.date( null );
255        instance.date_();
256    }
257
258    /**
259     * Test of sectionTitle method, of class SinkAdapter.
260     */
261    public void testSectionTitle()
262    {
263        final int level = SinkAdapter.SECTION_LEVEL_1;
264        instance.sectionTitle();
265        instance.sectionTitle_();
266        instance.sectionTitle( level, null );
267        instance.sectionTitle_( level );
268    }
269
270    /**
271     * Test of sectionTitle1 method, of class SinkAdapter.
272     */
273    public void testSectionTitle1()
274    {
275        final int level = SinkAdapter.SECTION_LEVEL_1;
276        instance.sectionTitle1();
277        instance.sectionTitle1_();
278        instance.sectionTitle( level, null );
279        instance.sectionTitle_( level );
280    }
281
282    /**
283     * Test of sectionTitle2 method, of class SinkAdapter.
284     */
285    public void testSectionTitle2()
286    {
287        final int level = SinkAdapter.SECTION_LEVEL_2;
288        instance.sectionTitle2();
289        instance.sectionTitle2_();
290        instance.sectionTitle( level, null );
291        instance.sectionTitle_( level );
292    }
293
294    /**
295     * Test of sectionTitle3 method, of class SinkAdapter.
296     */
297    public void testSectionTitle3()
298    {
299        final int level = SinkAdapter.SECTION_LEVEL_3;
300        instance.sectionTitle3();
301        instance.sectionTitle3_();
302        instance.sectionTitle( level, null );
303        instance.sectionTitle_( level );
304    }
305
306    /**
307     * Test of sectionTitle4 method, of class SinkAdapter.
308     */
309    public void testSectionTitle4()
310    {
311        final int level = SinkAdapter.SECTION_LEVEL_4;
312        instance.sectionTitle4();
313        instance.sectionTitle4_();
314        instance.sectionTitle( level, null );
315        instance.sectionTitle_( level );
316    }
317
318    /**
319     * Test of sectionTitle5 method, of class SinkAdapter.
320     */
321    public void testSectionTitle5()
322    {
323        final int level = SinkAdapter.SECTION_LEVEL_5;
324        instance.sectionTitle5();
325        instance.sectionTitle5_();
326        instance.sectionTitle( level, null );
327        instance.sectionTitle_( level );
328    }
329
330    /**
331     * Test of paragraph method, of class SinkAdapter.
332     */
333    public void testParagraph()
334    {
335        instance.paragraph();
336        instance.paragraph( null );
337        instance.paragraph_();
338    }
339
340    /**
341     * Test of verbatim method, of class SinkAdapter.
342     */
343    public void testVerbatim()
344    {
345        instance.verbatim( null );
346        instance.verbatim( false );
347        instance.verbatim_();
348    }
349
350    /**
351     * Test of definedTerm method, of class SinkAdapter.
352     */
353    public void testDefinedTerm()
354    {
355        instance.definedTerm();
356        instance.definedTerm( null );
357        instance.definedTerm_();
358    }
359
360    /**
361     * Test of figureCaption method, of class SinkAdapter.
362     */
363    public void testFigureCaption()
364    {
365        instance.figureCaption();
366        instance.figureCaption( null );
367        instance.figureCaption_();
368    }
369
370    /**
371     * Test of tableCell method, of class SinkAdapter.
372     */
373    public void testTableCell()
374    {
375        instance.tableCell();
376        instance.tableCell( (SinkEventAttributes) null );
377        instance.tableCell( (String) null );
378        instance.tableCell_();
379    }
380
381    /**
382     * Test of tableHeaderCell method, of class SinkAdapter.
383     */
384    public void testTableHeaderCell()
385    {
386        instance.tableHeaderCell();
387        instance.tableHeaderCell( (SinkEventAttributes) null );
388        instance.tableHeaderCell( (String) null );
389        instance.tableHeaderCell_();
390    }
391
392    /**
393     * Test of tableCaption method, of class SinkAdapter.
394     */
395    public void testTableCaption()
396    {
397        instance.tableCaption();
398        instance.tableCaption( null );
399        instance.tableCaption_();
400    }
401
402    /**
403     * Test of figureGraphics method, of class SinkAdapter.
404     */
405    public void testFigureGraphics()
406    {
407        String name = "";
408        instance.figureGraphics( name );
409        instance.figureGraphics( name, null );
410    }
411
412    /**
413     * Test of horizontalRule method, of class SinkAdapter.
414     */
415    public void testHorizontalRule()
416    {
417        instance.horizontalRule();
418        instance.horizontalRule( null );
419    }
420
421    /**
422     * Test of pageBreak method, of class SinkAdapter.
423     */
424    public void testPageBreak()
425    {
426        instance.pageBreak();
427    }
428
429    /**
430     * Test of anchor method, of class SinkAdapter.
431     */
432    public void testAnchor()
433    {
434        String name = "";
435        instance.anchor( name );
436        instance.anchor( name, null );
437        instance.anchor_();
438    }
439
440    /**
441     * Test of link method, of class SinkAdapter.
442     */
443    public void testLink()
444    {
445        String name = "";
446        instance.link( name );
447        instance.link( name, null );
448        instance.link_();
449    }
450
451    /**
452     * Test of italic method, of class SinkAdapter.
453     */
454    public void testItalic()
455    {
456        instance.italic();
457        instance.italic_();
458    }
459
460    /**
461     * Test of bold method, of class SinkAdapter.
462     */
463    public void testBold()
464    {
465        instance.bold();
466        instance.bold_();
467    }
468
469    /**
470     * Test of monospaced method, of class SinkAdapter.
471     */
472    public void testMonospaced()
473    {
474        instance.monospaced();
475        instance.monospaced_();
476    }
477
478    /**
479     * Test of lineBreak method, of class SinkAdapter.
480     */
481    public void testLineBreaks()
482    {
483        instance.lineBreak();
484        instance.lineBreak( null );
485    }
486
487    /**
488     * Test of nonBreakingSpace method, of class SinkAdapter.
489     */
490    public void testNonBreakingSpace()
491    {
492        instance.nonBreakingSpace();
493    }
494
495    /**
496     * Test of text method, of class SinkAdapter.
497     */
498    public void testText()
499    {
500        String text = "";
501        instance.text( text );
502        instance.text( text, null );
503    }
504
505    /**
506     * Test of rawText method, of class SinkAdapter.
507     */
508    public void testRawText()
509    {
510        String text = "";
511        instance.rawText( text );
512    }
513
514    /**
515     * Test of comment method, of class SinkAdapter.
516     */
517    public void testComment()
518    {
519        instance.comment( "" );
520    }
521
522    /**
523     * Test of flush method, of class SinkAdapter.
524     */
525    public void testFlush()
526    {
527        instance.flush();
528    }
529
530    /**
531     * Test of close method, of class SinkAdapter.
532     */
533    public void testClose()
534    {
535        instance.close();
536    }
537
538    /**
539     * Test of section method, of class SinkAdapter.
540     */
541    public void testSection()
542    {
543        int level = 0;
544        instance.section( level, null );
545        instance.section_( level );
546    }
547
548    /**
549     * Test of unknown method, of class SinkAdapter.
550     */
551    public void testUnknown()
552    {
553        String name = "";
554        Object[] requiredParams = null;
555        instance.unknown( name, requiredParams, null );
556    }
557}