1 package org.apache.maven.doxia.sink.impl;
2
3 import org.apache.maven.doxia.sink.SinkEventAttributes;
4 import org.apache.maven.doxia.sink.impl.SinkAdapter;
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 import junit.framework.TestCase;
26
27
28
29
30
31 public class SinkAdapterTest
32 extends TestCase
33 {
34 private final SinkAdapter instance = new SinkAdapter();
35
36
37
38
39 public void testHead()
40 {
41 instance.head();
42 instance.head( null );
43 instance.head_();
44 }
45
46
47
48
49 public void testBody()
50 {
51 instance.body();
52 instance.body( null );
53 instance.body_();
54 }
55
56
57
58
59 public void testSection1()
60 {
61 final int level = SinkAdapter.SECTION_LEVEL_1;
62 instance.section1();
63 instance.section1_();
64 instance.section( level, null );
65 instance.section_( level );
66 }
67
68
69
70
71 public void testSection2()
72 {
73 final int level = SinkAdapter.SECTION_LEVEL_2;
74 instance.section2();
75 instance.section2_();
76 instance.section( level, null );
77 instance.section_( level );
78 }
79
80
81
82
83 public void testSection3()
84 {
85 final int level = SinkAdapter.SECTION_LEVEL_3;
86 instance.section3();
87 instance.section3_();
88 instance.section( level, null );
89 instance.section_( level );
90 }
91
92
93
94
95 public void testSection4()
96 {
97 final int level = SinkAdapter.SECTION_LEVEL_4;
98 instance.section4();
99 instance.section4_();
100 instance.section( level, null );
101 instance.section_( level );
102 }
103
104
105
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
118
119 public void testList()
120 {
121 instance.list();
122 instance.list( null );
123 instance.list_();
124 }
125
126
127
128
129 public void testListItem()
130 {
131 instance.listItem();
132 instance.listItem( null );
133 instance.listItem_();
134 }
135
136
137
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
149
150 public void testNumberedListItem()
151 {
152 instance.numberedListItem();
153 instance.numberedListItem( null );
154 instance.numberedListItem_();
155 }
156
157
158
159
160 public void testDefinitionList()
161 {
162 instance.definitionList();
163 instance.definitionList( null );
164 instance.definitionList_();
165 }
166
167
168
169
170 public void testDefinitionListItem()
171 {
172 instance.definitionListItem();
173 instance.definitionListItem( null );
174 instance.definitionListItem_();
175 }
176
177
178
179
180 public void testDefinition()
181 {
182 instance.definition();
183 instance.definition( null );
184 instance.definition_();
185 }
186
187
188
189
190 public void testFigure()
191 {
192 instance.figure();
193 instance.figure( null );
194 instance.figure_();
195 }
196
197
198
199
200 public void testTable()
201 {
202 instance.table();
203 instance.table( null );
204 instance.table_();
205 }
206
207
208
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
220
221 public void testTableRow()
222 {
223 instance.tableRow();
224 instance.tableRow( null );
225 instance.tableRow_();
226 }
227
228
229
230
231 public void testTitle()
232 {
233 instance.title();
234 instance.title( null );
235 instance.title_();
236 }
237
238
239
240
241 public void testAuthor()
242 {
243 instance.author();
244 instance.author( null );
245 instance.author_();
246 }
247
248
249
250
251 public void testDate()
252 {
253 instance.date();
254 instance.date( null );
255 instance.date_();
256 }
257
258
259
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
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
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
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
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
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
332
333 public void testParagraph()
334 {
335 instance.paragraph();
336 instance.paragraph( null );
337 instance.paragraph_();
338 }
339
340
341
342
343 public void testVerbatim()
344 {
345 instance.verbatim( null );
346 instance.verbatim( false );
347 instance.verbatim_();
348 }
349
350
351
352
353 public void testDefinedTerm()
354 {
355 instance.definedTerm();
356 instance.definedTerm( null );
357 instance.definedTerm_();
358 }
359
360
361
362
363 public void testFigureCaption()
364 {
365 instance.figureCaption();
366 instance.figureCaption( null );
367 instance.figureCaption_();
368 }
369
370
371
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
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
394
395 public void testTableCaption()
396 {
397 instance.tableCaption();
398 instance.tableCaption( null );
399 instance.tableCaption_();
400 }
401
402
403
404
405 public void testFigureGraphics()
406 {
407 String name = "";
408 instance.figureGraphics( name );
409 instance.figureGraphics( name, null );
410 }
411
412
413
414
415 public void testHorizontalRule()
416 {
417 instance.horizontalRule();
418 instance.horizontalRule( null );
419 }
420
421
422
423
424 public void testPageBreak()
425 {
426 instance.pageBreak();
427 }
428
429
430
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
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
453
454 public void testItalic()
455 {
456 instance.italic();
457 instance.italic_();
458 }
459
460
461
462
463 public void testBold()
464 {
465 instance.bold();
466 instance.bold_();
467 }
468
469
470
471
472 public void testMonospaced()
473 {
474 instance.monospaced();
475 instance.monospaced_();
476 }
477
478
479
480
481 public void testLineBreaks()
482 {
483 instance.lineBreak();
484 instance.lineBreak( null );
485 }
486
487
488
489
490 public void testNonBreakingSpace()
491 {
492 instance.nonBreakingSpace();
493 }
494
495
496
497
498 public void testText()
499 {
500 String text = "";
501 instance.text( text );
502 instance.text( text, null );
503 }
504
505
506
507
508 public void testRawText()
509 {
510 String text = "";
511 instance.rawText( text );
512 }
513
514
515
516
517 public void testComment()
518 {
519 instance.comment( "" );
520 }
521
522
523
524
525 public void testFlush()
526 {
527 instance.flush();
528 }
529
530
531
532
533 public void testClose()
534 {
535 instance.close();
536 }
537
538
539
540
541 public void testSection()
542 {
543 int level = 0;
544 instance.section( level, null );
545 instance.section_( level );
546 }
547
548
549
550
551 public void testUnknown()
552 {
553 String name = "";
554 Object[] requiredParams = null;
555 instance.unknown( name, requiredParams, null );
556 }
557 }