Skip to content

Commit 8c74702

Browse files
committed
d updated markdown snippets
1 parent d3ac2b1 commit 8c74702

File tree

2 files changed

+16
-31
lines changed

2 files changed

+16
-31
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
| Input | Camel Case | Snake Case | Kebab Case |
2-
| --- | --- | --- | --- |
3-
| verify json | verifyJson | verify_json | verify-json |
4-
| verify all | verifyAll | verify_all | verify-all |
5-
| verify parameters | verifyParameters | verify_parameters | verify-parameters |
6-
| verify as json | verifyAsJson | verify_as_json | verify-as-json |
1+
| Input | Camel Case | Snake Case | Kebab Case |
2+
| --- | --- | --- | --- |
3+
| verify json | verifyJson | verify_json | verify-json |
4+
| verify all | verifyAll | verify_all | verify-all |
5+
| verify parameters | verifyParameters | verify_parameters | verify-parameters |
6+
| verify as json | verifyAsJson | verify_as_json | verify-as-json |

approvaltests/docs/how_to/TestAVarietyOfValues.md

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -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);
6364
Approvals.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

6869
which 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

Comments
 (0)