Skip to content

Commit 20d29da

Browse files
committed
. d reformatted code and updated markdown snippets
1 parent 704023d commit 20d29da

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

approvaltests-util/docs/how_to/LoadersAndSavers.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void sendOutSeniorDiscounts(DataBase database, MailServer mailServer)
5252
}
5353
}
5454
```
55-
<sup><a href='/approvaltests-util-tests/src/test/java/com/spun/util/persistence/LoadersAndSaversExamplesTest.java#L61-L72' title='Snippet source file'>snippet source</a> | <a href='#snippet-step1' title='Start of snippet'>anchor</a></sup>
55+
<sup><a href='/approvaltests-util-tests/src/test/java/com/spun/util/persistence/LoadersAndSaversExamplesTest.java#L68-L79' title='Snippet source file'>snippet source</a> | <a href='#snippet-step1' title='Start of snippet'>anchor</a></sup>
5656
<!-- endSnippet -->
5757

5858
In this case, we want to replace the functions that use the DataBase object with Loaders :
@@ -72,7 +72,7 @@ public void senior_customer_list_includes_only_those_over_age_65()
7272
Approvals.verifyAll("", mailServer.getRecipients());
7373
}
7474
```
75-
<sup><a href='/approvaltests-util-tests/src/test/java/com/spun/util/persistence/LoadersAndSaversExamplesTest.java#L13-L22' title='Snippet source file'>snippet source</a> | <a href='#snippet-step0' title='Start of snippet'>anchor</a></sup>
75+
<sup><a href='/approvaltests-util-tests/src/test/java/com/spun/util/persistence/LoadersAndSaversExamplesTest.java#L16-L25' title='Snippet source file'>snippet source</a> | <a href='#snippet-step0' title='Start of snippet'>anchor</a></sup>
7676
<!-- endSnippet -->
7777

7878
This test works against a live database with a live mail server.
@@ -94,7 +94,7 @@ Now we dump the data resulting from a successful query so that we can create a f
9494
List<Customer> seniorCustomers = database.getSeniorCustomers();
9595
seniorCustomers.stream().forEach(System.out::println);
9696
```
97-
<sup><a href='/approvaltests-util-tests/src/test/java/com/spun/util/persistence/LoadersAndSaversExamplesTest.java#L41-L44' title='Snippet source file'>snippet source</a> | <a href='#snippet-step_capture_data' title='Start of snippet'>anchor</a></sup>
97+
<sup><a href='/approvaltests-util-tests/src/test/java/com/spun/util/persistence/LoadersAndSaversExamplesTest.java#L47-L50' title='Snippet source file'>snippet source</a> | <a href='#snippet-step_capture_data' title='Start of snippet'>anchor</a></sup>
9898
<!-- endSnippet -->
9999

100100
generates
@@ -116,7 +116,7 @@ Step 3: Create a result object populated with these values (or at least enough o
116116
List.of(new Customer("Bob, Jones, 123 Elm St., Tempe, AZ, 14-MAR-1958"),
117117
new Customer("Mary, Smith, 345 Oak St., Mason, VA, 04-MAY-1944"));
118118
```
119-
<sup><a href='/approvaltests-util-tests/src/test/java/com/spun/util/persistence/LoadersAndSaversExamplesTest.java#L52-L55' title='Snippet source file'>snippet source</a> | <a href='#snippet-step_fake_data' title='Start of snippet'>anchor</a></sup>
119+
<sup><a href='/approvaltests-util-tests/src/test/java/com/spun/util/persistence/LoadersAndSaversExamplesTest.java#L59-L62' title='Snippet source file'>snippet source</a> | <a href='#snippet-step_fake_data' title='Start of snippet'>anchor</a></sup>
120120
<!-- endSnippet -->
121121

122122
### Step 4: In the original method, replace the function call with a Loader

approvaltests/docs/Features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ ApprovalNamer namer = Approvals.createApprovalNamer();
9595
Function2<File, File, VerifyResult> approveEverything = (r, a) -> VerifyResult.SUCCESS;
9696
Approvals.verify(new FileApprover(writer, namer, approveEverything));
9797
```
98-
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/approvers/FileApproverTest.java#L66-L71' title='Snippet source file'>snippet source</a> | <a href='#snippet-custom_approver' title='Start of snippet'>anchor</a></sup>
98+
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/approvers/FileApproverTest.java#L67-L72' title='Snippet source file'>snippet source</a> | <a href='#snippet-custom_approver' title='Start of snippet'>anchor</a></sup>
9999
<!-- endSnippet -->
100100

101101

approvaltests/docs/how_to/ConfigureReporters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ All the [verify](./reference/Verify.md) functions have an overload that takes an
3939
Options options = new Options().withReporter(BeyondCompareReporter.INSTANCE);
4040
Approvals.verify(objectUnderTest, options);
4141
```
42-
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/ApprovalsTest.java#L24-L27' title='Snippet source file'>snippet source</a> | <a href='#snippet-configure_reporter_with_options' title='Start of snippet'>anchor</a></sup>
42+
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/ApprovalsTest.java#L21-L24' title='Snippet source file'>snippet source</a> | <a href='#snippet-configure_reporter_with_options' title='Start of snippet'>anchor</a></sup>
4343
<!-- endSnippet -->
4444

4545
### Method 2: Class and Method Level Annotations

approvaltests/docs/how_to/TestAVarietyOfValues.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ If you have more than one parameter that you want to vary, check out [Testing Co
2525
String[] inputs = {"input.value1", "input.value2"};
2626
Approvals.verifyAll("TITLE", inputs, s -> "placeholder " + s);
2727
```
28-
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/ApprovalsTest.java#L46-L49' title='Snippet source file'>snippet source</a> | <a href='#snippet-VerifyAllStartingPoint' title='Start of snippet'>anchor</a></sup>
28+
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/ApprovalsTest.java#L43-L46' title='Snippet source file'>snippet source</a> | <a href='#snippet-VerifyAllStartingPoint' title='Start of snippet'>anchor</a></sup>
2929
<!-- endSnippet -->
3030

3131
2. Modify the input container for your chosen values.

approvaltests/docs/reference/Options.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ It is on all `verify()` methods, as an optional parameter.
2727
<!-- snippet: specify_all_the_options -->
2828
<a id='snippet-specify_all_the_options'></a>
2929
```java
30-
new Options().withReporter(new QuietReporter()).withScrubber(new GuidScrubber()).forFile()
30+
new Options().withReporter(new ReportNothing()).withScrubber(new GuidScrubber()).forFile()
3131
.withExtension(".json");
3232
```
33-
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/OptionsSamplesTest.java#L14-L17' title='Snippet source file'>snippet source</a> | <a href='#snippet-specify_all_the_options' title='Start of snippet'>anchor</a></sup>
33+
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/OptionsSamplesTest.java#L15-L18' title='Snippet source file'>snippet source</a> | <a href='#snippet-specify_all_the_options' title='Start of snippet'>anchor</a></sup>
3434
<!-- endSnippet -->
3535

3636
## Reporters
@@ -55,7 +55,7 @@ If you want to change the file extension of both the approved and received files
5555
```java
5656
Approvals.verify("text to be verified", new Options().forFile().withExtension(".xyz"));
5757
```
58-
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/OptionsSamplesTest.java#L22-L24' title='Snippet source file'>snippet source</a> | <a href='#snippet-basic_approval_with_file_extension' title='Start of snippet'>anchor</a></sup>
58+
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/OptionsSamplesTest.java#L23-L25' title='Snippet source file'>snippet source</a> | <a href='#snippet-basic_approval_with_file_extension' title='Start of snippet'>anchor</a></sup>
5959
<!-- endSnippet -->
6060

6161
**Note:** `withExtension()` returns an `Options` object, so it's possible to keep appending more `with...()` calls.

0 commit comments

Comments
 (0)