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 11, 2023
1 parent 0feac60 commit 13c9772
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion approvaltests/docs/Reporters.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ All the [verify](./reference/Verify.md) functions have an overload that takes an
Options options = new Options().withReporter(BeyondCompareReporter.INSTANCE);
Approvals.verify(objectUnderTest, options);
```
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/ApprovalsTest.java#L22-L25' title='Snippet source file'>snippet source</a> | <a href='#snippet-configure_reporter_with_options' title='Start of snippet'>anchor</a></sup>
<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>
<!-- endSnippet -->

### Class and Method level
Expand Down
8 changes: 4 additions & 4 deletions approvaltests/docs/Scrubbers.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ For example:
```java
Approvals.verifyAll("guids", guids, new Options(Scrubbers::scrubGuid));
```
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/scrubbers/ScrubberTest.java#L39-L41' title='Snippet source file'>snippet source</a> | <a href='#snippet-guid-scrubbing-2' title='Start of snippet'>anchor</a></sup>
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/scrubbers/ScrubberTest.java#L40-L42' title='Snippet source file'>snippet source</a> | <a href='#snippet-guid-scrubbing-2' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

## Guid Scrubbing
Expand All @@ -50,7 +50,7 @@ String[] guids = {"2fd78d4a-ad49-447d-96a8-deda585a9aa5",
"2fd78d4a-ad49-447d-96a8-deda585a9aa5",
"2fd78d4a-ad49-447d-96a8-deda585a9aa5 and text"};
```
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/scrubbers/ScrubberTest.java#L32-L38' title='Snippet source file'>snippet source</a> | <a href='#snippet-guid-scrubbing-1' title='Start of snippet'>anchor</a></sup>
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/scrubbers/ScrubberTest.java#L33-L39' title='Snippet source file'>snippet source</a> | <a href='#snippet-guid-scrubbing-1' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->
You can make this output deterministic by using a scrubber in the options.
For example:
Expand All @@ -59,7 +59,7 @@ For example:
```java
Approvals.verifyAll("guids", guids, new Options(Scrubbers::scrubGuid));
```
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/scrubbers/ScrubberTest.java#L39-L41' title='Snippet source file'>snippet source</a> | <a href='#snippet-guid-scrubbing-2' title='Start of snippet'>anchor</a></sup>
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/scrubbers/ScrubberTest.java#L40-L42' title='Snippet source file'>snippet source</a> | <a href='#snippet-guid-scrubbing-2' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->
This will result in the following `.approved.txt` file
<!-- snippet: /src/test/java/org/approvaltests/scrubbers/ScrubberTest.scrubGuids.approved.txt -->
Expand Down Expand Up @@ -156,7 +156,7 @@ Scrubber scrubber = Scrubbers.scrubAll(portScrubber, dateScrubber, signatureScru
Approvals.verify("http://127.0.0.1:55079/foo/bar?Date=20210505T091112Z&Signature=4a7dd6f09c1e",
new Options(scrubber));
```
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/scrubbers/ScrubberTest.java#L46-L53' title='Snippet source file'>snippet source</a> | <a href='#snippet-multiscrubber' title='Start of snippet'>anchor</a></sup>
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/scrubbers/ScrubberTest.java#L47-L54' title='Snippet source file'>snippet source</a> | <a href='#snippet-multiscrubber' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

will result in
Expand Down
2 changes: 1 addition & 1 deletion approvaltests/docs/how_to/CaptureFilesFromCI.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Here is an example:
CustomPanel panel = new CustomPanel(true, 20);
AwtApprovals.verify(panel, new Options(new FileCaptureReporter()));
```
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/awt/ApprovalsTest.java#L32-L35' title='Snippet source file'>snippet source</a> | <a href='#snippet-file_capture_reporter_example' title='Start of snippet'>anchor</a></sup>
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/awt/ApprovalsTest.java#L39-L42' title='Snippet source file'>snippet source</a> | <a href='#snippet-file_capture_reporter_example' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

The example above demonstrates how to use FileCaptureReporter with ApprovalTests to capture received files on test failure.
Expand Down
2 changes: 1 addition & 1 deletion approvaltests/docs/how_to/TestAVarietyOfValues.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If you have more than one parameter that you want to vary, check out [Testing Co
String[] inputs = {"input.value1", "input.value2"};
Approvals.verifyAll("TITLE", inputs, s -> "placeholder " + s);
```
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/ApprovalsTest.java#L44-L47' title='Snippet source file'>snippet source</a> | <a href='#snippet-verifyallstartingpoint' title='Start of snippet'>anchor</a></sup>
<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>
<!-- endSnippet -->

2. Modify the input container for your chosen values.
Expand Down
2 changes: 1 addition & 1 deletion approvaltests/docs/reference/AwtApprovals.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ for every frame. Here is an example for a simple expanding box:
SquareDrawer squareDrawer = new SquareDrawer();
AwtApprovals.verifySequence(5, f -> squareDrawer.setSquareSize(f * 10));
```
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/awt/ApprovalsTest.java#L41-L44' title='Snippet source file'>snippet source</a> | <a href='#snippet-sequencepaintables' title='Start of snippet'>anchor</a></sup>
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/awt/ApprovalsTest.java#L48-L51' title='Snippet source file'>snippet source</a> | <a href='#snippet-sequencepaintables' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

**Note**: Method overloads allow specifying the time between frames or the time for each frame.
Expand Down
2 changes: 1 addition & 1 deletion approvaltests/docs/reference/StoryBoard.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Here is a simple example
```java
Approvals.verify(new StoryBoard().add(gameOfLife).addFrames(3, gameOfLife::advance));
```
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/StoryBoardTest.java#L22-L24' title='Snippet source file'>snippet source</a> | <a href='#snippet-storyboardexample' title='Start of snippet'>anchor</a></sup>
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/StoryBoardTest.java#L23-L25' title='Snippet source file'>snippet source</a> | <a href='#snippet-storyboardexample' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

which produces
Expand Down

0 comments on commit 13c9772

Please sign in to comment.