Skip to content

Commit

Permalink
. d updated markdown snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Sep 16, 2024
1 parent c09af6e commit 81468ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions approvaltests-util/docs/how_to/LoadersAndSavers.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void sendOutSeniorDiscounts(DataBase database, MailServer mailServer)
}
}
```
<sup><a href='/approvaltests-util-tests/src/test/java/com/spun/util/persistence/LoadersAndSaversExamplesTest.java#L60-L71' title='Snippet source file'>snippet source</a> | <a href='#snippet-step1' title='Start of snippet'>anchor</a></sup>
<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>
<!-- endSnippet -->

In this case, we want to replace the functions that use the DataBase object with Loaders :
Expand All @@ -72,7 +72,7 @@ public void senior_customer_list_includes_only_those_over_age_65()
Approvals.verifyAll("", mailServer.getRecipients());
}
```
<sup><a href='/approvaltests-util-tests/src/test/java/com/spun/util/persistence/LoadersAndSaversExamplesTest.java#L12-L21' title='Snippet source file'>snippet source</a> | <a href='#snippet-step0' title='Start of snippet'>anchor</a></sup>
<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>
<!-- endSnippet -->

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

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

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

0 comments on commit 81468ae

Please sign in to comment.