@@ -58,38 +58,23 @@ Here's an example:
5858<!-- snippet: markdown_table_example -->
5959<a id =' snippet-markdown_table_example ' ></a >
6060``` java
61- Integer [] inputs = Range . get(1 , 20 );
62- MarkdownTable table = MarkdownTable . create(inputs, a - > getModifier(a), " Score" , " Modifier" );
61+ String [] inputs = {" verify json" , " verify all" , " verify parameters" , " verify as json" };
62+ MarkdownTable table = MarkdownTable . withHeaders(" Input" , " Camel Case" , " Snake Case" , " Kebab Case" );
63+ table. addRowsForInputs(inputs, this :: toCamelCase, this :: toSnakeCase, this :: toKebabCase);
6364Approvals . verify(table);
6465```
65- <sup ><a href =' /approvaltests-tests/src/test/java/org/approvaltests/TableTest.java#L12-L16 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-markdown_table_example ' title =' Start of snippet ' >anchor</a ></sup >
66+ <sup ><a href =' /approvaltests-tests/src/test/java/org/approvaltests/TableTest.java#L19-L24 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-markdown_table_example ' title =' Start of snippet ' >anchor</a ></sup >
6667<!-- endSnippet -->
6768
6869which will produce:
6970
7071<!-- include: TableTest.differentCases.approved.md -->
71- | Score | Modifier |
72- | --- | --- |
73- | 1 | -5 |
74- | 2 | -4 |
75- | 3 | -4 |
76- | 4 | -3 |
77- | 5 | -3 |
78- | 6 | -2 |
79- | 7 | -2 |
80- | 8 | -1 |
81- | 9 | -1 |
82- | 10 | 0 |
83- | 11 | 0 |
84- | 12 | 1 |
85- | 13 | 1 |
86- | 14 | 2 |
87- | 15 | 2 |
88- | 16 | 3 |
89- | 17 | 3 |
90- | 18 | 4 |
91- | 19 | 4 |
92- | 20 | 5 |
72+ | Input | Camel Case | Snake Case | Kebab Case |
73+ | --- | --- | --- | --- |
74+ | verify json | verifyJson | verify_json | verify-json |
75+ | verify all | verifyAll | verify_all | verify-all |
76+ | verify parameters | verifyParameters | verify_parameters | verify-parameters |
77+ | verify as json | verifyAsJson | verify_as_json | verify-as-json |
9378<!-- endInclude -->
9479
9580
0 commit comments