-
-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
add102e
commit 26b467a
Showing
42 changed files
with
217 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!-- | ||
GENERATED FILE - DO NOT EDIT | ||
This file was generated by [MarkdownSnippets](https://github.com/SimonCropp/MarkdownSnippets). | ||
Source File: /docs/mdsource/append-file.source.md | ||
To change this file edit the source file and then run MarkdownSnippets. | ||
--> | ||
|
||
# AppendFile | ||
|
||
Allows extra files to be verified in addition to the primary target. | ||
|
||
|
||
## Binary | ||
|
||
<!-- snippet: BinaryFluent --> | ||
<a id='snippet-binaryfluent'></a> | ||
```cs | ||
[Fact] | ||
public Task BinaryFluent() => | ||
Verify("Foo", settings) | ||
.AppendFile("sample.png"); | ||
``` | ||
<sup><a href='/src/Verify.Tests/Converters/InstanceFileAppenderTests.cs#L21-L28' title='Snippet source file'>snippet source</a> | <a href='#snippet-binaryfluent' title='Start of snippet'>anchor</a></sup> | ||
<!-- endSnippet --> | ||
|
||
|
||
## Text | ||
|
||
<!-- snippet: TextFluent --> | ||
<a id='snippet-textfluent'></a> | ||
```cs | ||
[Fact] | ||
public Task TextFluent() => | ||
Verify("Foo") | ||
.AppendFile("extra content"); | ||
``` | ||
<sup><a href='/src/Verify.Tests/Converters/InstanceFileAppenderTests.cs#L30-L37' title='Snippet source file'>snippet source</a> | <a href='#snippet-textfluent' title='Start of snippet'>anchor</a></sup> | ||
<!-- endSnippet --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# AppendFile | ||
|
||
Allows extra files to be verified in addition to the primary target. | ||
|
||
|
||
## Binary | ||
|
||
snippet: BinaryFluent | ||
|
||
|
||
## Text | ||
|
||
snippet: TextFluent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/Converters/InstanceFileAppenderTests.BinaryFluent#01.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
appendedFile |
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/Converters/InstanceFileAppenderTests.BinaryFluent#02.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sample.png |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/Converters/InstanceFileAppenderTests.Text#01.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
appendedFile |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/Converters/InstanceFileAppenderTests.TextBytesFluent#01.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
appendedFile |
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/Converters/InstanceFileAppenderTests.TextFluent#00.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Foo |
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/Converters/InstanceFileAppenderTests.TextFluent#01.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
extra content |
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/Converters/InstanceFileAppenderTests.TextStreamFluent#00.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Foo |
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/Converters/InstanceFileAppenderTests.TextStreamFluent#01.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
appendedFile |
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/Converters/InstanceFileAppenderTests.WithName#00.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Foo |
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/Converters/InstanceFileAppenderTests.WithName#01.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
appendedFile |
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/Converters/InstanceFileAppenderTests.WithName#theName.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
extra content |
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/Converters/InstanceFileAppenderTests.WithScrubbing#00.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Foo |
2 changes: 2 additions & 0 deletions
2
src/Verify.Tests/Converters/InstanceFileAppenderTests.WithScrubbing#01.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
line1 | ||
line3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[UsesVerify] | ||
public class InstanceFileAppenderTests | ||
{ | ||
VerifySettings settings; | ||
|
||
public InstanceFileAppenderTests() | ||
{ | ||
settings = new(); | ||
settings.AppendFile("appendedFile"); | ||
} | ||
|
||
[Fact] | ||
public Task Text() => | ||
Verify("Foo", settings); | ||
|
||
[Fact] | ||
public Task WithName() => | ||
Verify("Foo", settings) | ||
.AppendFile("extra content", name: "theName"); | ||
|
||
#region BinaryFluent | ||
|
||
[Fact] | ||
public Task BinaryFluent() => | ||
Verify("Foo", settings) | ||
.AppendFile("sample.png"); | ||
|
||
#endregion | ||
|
||
#region TextFluent | ||
|
||
[Fact] | ||
public Task TextFluent() => | ||
Verify("Foo") | ||
.AppendFile("extra content"); | ||
|
||
#endregion | ||
|
||
[Fact] | ||
public Task WithScrubbing() => | ||
Verify("Foo") | ||
.AppendFile(""" | ||
line1 | ||
line2 | ||
line3 | ||
""") | ||
.ScrubLinesContaining("line2"); | ||
|
||
[Fact] | ||
public Task TextBytesFluent() => | ||
Verify("Foo") | ||
.AppendFile(Encoding.UTF8.GetBytes("appendedFile")); | ||
|
||
[Fact] | ||
public Task TextStreamFluent() => | ||
Verify("Foo") | ||
.AppendFile(new MemoryStream(Encoding.UTF8.GetBytes("appendedFile"))); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/Converters/StaticFileAppenderTests.File#00.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Foo |
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/Converters/StaticFileAppenderTests.Stream#00.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Foo |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
src/Verify.Tests/Converters/StaticFileAppenderTests.Text#00.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Foo |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters