Skip to content

Commit

Permalink
Docs changes
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 18, 2020
1 parent 7f30772 commit edfc135
Show file tree
Hide file tree
Showing 14 changed files with 103 additions and 103 deletions.
8 changes: 4 additions & 4 deletions docs/anonymous-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public async Task Anon()
}
```
<sup><a href='/src/Verify.Xunit.Tests/VerifyObjectSamples.cs#L65-L87' title='File snippet `anonxunit` was extracted from'>snippet source</a> | <a href='#snippet-anonxunit' title='Navigate to start of snippet `anonxunit`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


## NUnit
Expand Down Expand Up @@ -69,7 +69,7 @@ public async Task Anon()
}
```
<sup><a href='/src/Verify.NUnit.Tests/VerifyObjectSamples.cs#L68-L90' title='File snippet `anonnunit` was extracted from'>snippet source</a> | <a href='#snippet-anonnunit' title='Navigate to start of snippet `anonnunit`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


## MSTest
Expand Down Expand Up @@ -100,7 +100,7 @@ public async Task Anon()
}
```
<sup><a href='/src/Verify.MSTest.Tests/VerifyObjectSamples.cs#L67-L89' title='File snippet `anonmstest` was extracted from'>snippet source</a> | <a href='#snippet-anonmstest' title='Navigate to start of snippet `anonmstest`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


## Results
Expand All @@ -122,4 +122,4 @@ Results in the following:
}
```
<sup><a href='/src/Verify.Xunit.Tests/VerifyObjectSamples.Anon.verified.txt#L1-L10' title='File snippet `Verify.Xunit.Tests/VerifyObjectSamples.Anon.verified.txt` was extracted from'>snippet source</a> | <a href='#snippet-Verify.Xunit.Tests/VerifyObjectSamples.Anon.verified.txt' title='Navigate to start of snippet `Verify.Xunit.Tests/VerifyObjectSamples.Anon.verified.txt`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->
4 changes: 2 additions & 2 deletions docs/build-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on_failure:
- ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
```
<sup><a href='/src/appveyor.yml#L11-L14' title='File snippet `appveyorartifacts` was extracted from'>snippet source</a> | <a href='#snippet-appveyorartifacts' title='Navigate to start of snippet `appveyorartifacts`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->

See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts).

Expand Down Expand Up @@ -53,4 +53,4 @@ if (BuildServerDetector.Detected)
}
```
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L83-L97' title='File snippet `derivetestdirectory` was extracted from'>snippet source</a> | <a href='#snippet-derivetestdirectory' title='Navigate to start of snippet `derivetestdirectory`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->
6 changes: 3 additions & 3 deletions docs/clipboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ var settings = new VerifySettings();
settings.DisableClipboard();
```
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L38-L43' title='File snippet `disableclipboard` was extracted from'>snippet source</a> | <a href='#snippet-disableclipboard' title='Navigate to start of snippet `disableclipboard`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


### For all tests
Expand All @@ -78,7 +78,7 @@ settings.DisableClipboard();
VerifierSettings.DisableClipboard();
```
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L74-L78' title='File snippet `disableclipboardglobal` was extracted from'>snippet source</a> | <a href='#snippet-disableclipboardglobal' title='Navigate to start of snippet `disableclipboardglobal`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->

If clipboard is disabled for all tests, it can be re-enabled at the test level:

Expand All @@ -89,7 +89,7 @@ var settings = new VerifySettings();
settings.EnableClipboard();
```
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L64-L69' title='File snippet `enableclipboard` was extracted from'>snippet source</a> | <a href='#snippet-enableclipboard' title='Navigate to start of snippet `enableclipboard`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


### For a machine
Expand Down
6 changes: 3 additions & 3 deletions docs/compared-to-assertion.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static class ClassBeingTested
}
```
<sup><a href='/src/TargetLibrary/ClassBeingTested.cs#L4-L29' title='File snippet `classbeingtested` was extracted from'>snippet source</a> | <a href='#snippet-classbeingtested' title='Navigate to start of snippet `classbeingtested`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


### Tests
Expand Down Expand Up @@ -84,7 +84,7 @@ public void TraditionalTest()
}
```
<sup><a href='/src/Verify.Xunit.Tests/Snippets/CompareToAssert.cs#L9-L25' title='File snippet `traditionaltest` was extracted from'>snippet source</a> | <a href='#snippet-traditionaltest' title='Navigate to start of snippet `traditionaltest`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


#### Verification test
Expand All @@ -100,4 +100,4 @@ public Task Simple()
}
```
<sup><a href='/src/Verify.Xunit.Tests/Snippets/CompareToAssert.cs#L27-L34' title='File snippet `verificationtest` was extracted from'>snippet source</a> | <a href='#snippet-verificationtest' title='Navigate to start of snippet `verificationtest`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->
8 changes: 4 additions & 4 deletions docs/comparer.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static Digest HashImage(Stream stream)
}
```
<sup><a href='/src/Verify.Tests/Snippets/ComparerSnippets.cs#L32-L57' title='File snippet `imagecomparer` was extracted from'>snippet source</a> | <a href='#snippet-imagecomparer' title='Navigate to start of snippet `imagecomparer`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->

The returned `CompareResult.NotEqual` takes an optional message that will be rendered in the resulting text displayed to the user on test failure.

Expand All @@ -61,7 +61,7 @@ settings.UseExtension("png");
await Verifier.Verify("TheImage.png", settings);
```
<sup><a href='/src/Verify.Tests/Snippets/ComparerSnippets.cs#L14-L19' title='File snippet `instancecomparer` was extracted from'>snippet source</a> | <a href='#snippet-instancecomparer' title='Navigate to start of snippet `instancecomparer`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


### Static comparer
Expand All @@ -75,7 +75,7 @@ VerifierSettings.RegisterComparer(
await Verifier.VerifyFile("TheImage.png");
```
<sup><a href='/src/Verify.Tests/Snippets/ComparerSnippets.cs#L24-L29' title='File snippet `staticcomparer` was extracted from'>snippet source</a> | <a href='#snippet-staticcomparer' title='Navigate to start of snippet `staticcomparer`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


## Default Comparison
Expand Down Expand Up @@ -132,7 +132,7 @@ static async Task<int> ReadBufferAsync(Stream stream, byte[] buffer)
}
```
<sup><a href='/src/Verify/Compare/FileComparer.cs#L73-L121' title='File snippet `defualtcompare` was extracted from'>snippet source</a> | <a href='#snippet-defualtcompare' title='Navigate to start of snippet `defualtcompare`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


## Pre-packaged comparers
Expand Down
14 changes: 7 additions & 7 deletions docs/converter.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The info file:
}
```
<sup><a href='/src/Verify.Tests/Snippets/ConverterSnippets.Type.info.verified.txt#L1-L4' title='File snippet `ConverterSnippets.Type.info.verified.txt` was extracted from'>snippet source</a> | <a href='#snippet-ConverterSnippets.Type.info.verified.txt' title='Navigate to start of snippet `ConverterSnippets.Type.info.verified.txt`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->

Multiple png files:

Expand Down Expand Up @@ -77,7 +77,7 @@ VerifierSettings.RegisterFileConverter<Image>(
});
```
<sup><a href='/src/Verify.Tests/Snippets/ConverterSnippets.cs#L17-L45' title='File snippet `registerfileconvertertype` was extracted from'>snippet source</a> | <a href='#snippet-registerfileconvertertype' title='Navigate to start of snippet `registerfileconvertertype`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->

<!-- snippet: FileConverterTypeVerify -->
<a id='snippet-fileconvertertypeverify'></a>
Expand All @@ -86,7 +86,7 @@ await using var stream = File.OpenRead("sample.tif");
await Verifier.Verify(Image.FromStream(stream));
```
<sup><a href='/src/Verify.Tests/Snippets/ConverterSnippets.cs#L46-L49' title='File snippet `fileconvertertypeverify` was extracted from'>snippet source</a> | <a href='#snippet-fileconvertertypeverify' title='Navigate to start of snippet `fileconvertertypeverify`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->

Note that this sample also uses the optional `canConvert` to ensure that only `Image`s that are tiffs are converted.

Expand All @@ -96,7 +96,7 @@ Note that this sample also uses the optional `canConvert` to ensure that only `I
canConvert: (target, settings) => Equals(target.RawFormat, ImageFormat.Tiff),
```
<sup><a href='/src/Verify.Tests/Snippets/ConverterSnippets.cs#L19-L21' title='File snippet `convertercanconvert` was extracted from'>snippet source</a> | <a href='#snippet-convertercanconvert' title='Navigate to start of snippet `convertercanconvert`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


### Expression converter
Expand Down Expand Up @@ -133,15 +133,15 @@ VerifierSettings.RegisterFileConverter(
});
```
<sup><a href='/src/Verify.Tests/Snippets/ConverterSnippets.cs#L55-L82' title='File snippet `registerfileconverterextension` was extracted from'>snippet source</a> | <a href='#snippet-registerfileconverterextension' title='Navigate to start of snippet `registerfileconverterextension`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->

<!-- snippet: FileConverterExtensionVerify -->
<a id='snippet-fileconverterextensionverify'></a>
```cs
await Verifier.VerifyFile("sample.tif");
```
<sup><a href='/src/Verify.Tests/Snippets/ConverterSnippets.cs#L83-L85' title='File snippet `fileconverterextensionverify` was extracted from'>snippet source</a> | <a href='#snippet-fileconverterextensionverify' title='Navigate to start of snippet `fileconverterextensionverify`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


### Cleanup
Expand All @@ -162,7 +162,7 @@ return new ConversionResult(
});
```
<sup><a href='/src/Verify.Tests/Converters/TypeConverterTests.cs#L63-L73' title='File snippet `conversionresultwithcleanup` was extracted from'>snippet source</a> | <a href='#snippet-conversionresultwithcleanup' title='Navigate to start of snippet `conversionresultwithcleanup`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


## Shipping
Expand Down
6 changes: 3 additions & 3 deletions docs/named-tuples.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static (bool Member1, string Member2, string Member3) MethodWithNamedTuple()
}
```
<sup><a href='/src/Verify.Tests/Serialization/SerializationTests.cs#L344-L351' title='File snippet `methodwithnamedtuple` was extracted from'>snippet source</a> | <a href='#snippet-methodwithnamedtuple' title='Navigate to start of snippet `methodwithnamedtuple`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->

Can be verified:

Expand All @@ -32,7 +32,7 @@ Can be verified:
await Verifier.Verify(() => MethodWithNamedTuple());
```
<sup><a href='/src/Verify.Tests/Serialization/SerializationTests.cs#L337-L341' title='File snippet `verifytuple` was extracted from'>snippet source</a> | <a href='#snippet-verifytuple' title='Navigate to start of snippet `verifytuple`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->

Resulting in:

Expand All @@ -46,4 +46,4 @@ Resulting in:
}
```
<sup><a href='/src/Verify.Tests/Serialization/SerializationTests.NamedTuple.verified.txt#L1-L5' title='File snippet `SerializationTests.NamedTuple.verified.txt` was extracted from'>snippet source</a> | <a href='#snippet-SerializationTests.NamedTuple.verified.txt' title='Navigate to start of snippet `SerializationTests.NamedTuple.verified.txt`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->
14 changes: 7 additions & 7 deletions docs/naming.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class UniqueForSample
}
```
<sup><a href='/src/Verify.Xunit.Tests/Snippets/UniqueForSample.cs#L6-L36' title='File snippet `uniqueforsamplexunit` was extracted from'>snippet source</a> | <a href='#snippet-uniqueforsamplexunit' title='Navigate to start of snippet `uniqueforsamplexunit`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


### NUnit
Expand Down Expand Up @@ -100,7 +100,7 @@ public class UniqueForSample
}
```
<sup><a href='/src/Verify.NUnit.Tests/Snippets/UniqueForSample.cs#L5-L35' title='File snippet `uniqueforsamplenunit` was extracted from'>snippet source</a> | <a href='#snippet-uniqueforsamplenunit' title='Navigate to start of snippet `uniqueforsamplenunit`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


### MSTest
Expand Down Expand Up @@ -138,7 +138,7 @@ public class UniqueForSample :
}
```
<sup><a href='/src/Verify.MSTest.Tests/Snippets/UniqueForSample.cs#L6-L35' title='File snippet `uniqueforsamplemstest` was extracted from'>snippet source</a> | <a href='#snippet-uniqueforsamplemstest' title='Navigate to start of snippet `uniqueforsamplemstest`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


### Result
Expand Down Expand Up @@ -311,7 +311,7 @@ public class ExtensionSample
}
```
<sup><a href='/src/Verify.Xunit.Tests/Snippets/ExtensionSample.cs#L1-L43' title='File snippet `ExtensionSample.cs` was extracted from'>snippet source</a> | <a href='#snippet-ExtensionSample.cs-2' title='Navigate to start of snippet `ExtensionSample.cs`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->

Result in two files:

Expand All @@ -325,7 +325,7 @@ Result in two files:
}
```
<sup><a href='/src/Verify.Xunit.Tests/Snippets/ExtensionSample.SharedClassLevelSettings.verified.json#L1-L5' title='File snippet `Verify.Xunit.Tests/Snippets/ExtensionSample.SharedClassLevelSettings.verified.json` was extracted from'>snippet source</a> | <a href='#snippet-Verify.Xunit.Tests/Snippets/ExtensionSample.SharedClassLevelSettings.verified.json' title='Navigate to start of snippet `Verify.Xunit.Tests/Snippets/ExtensionSample.SharedClassLevelSettings.verified.json`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->

<!-- snippet: Verify.Xunit.Tests/Snippets/ExtensionSample.AtMethod.verified.xml -->
<a id='snippet-Verify.Xunit.Tests/Snippets/ExtensionSample.AtMethod.verified.xml'></a>
Expand All @@ -337,7 +337,7 @@ Result in two files:
</note>
```
<sup><a href='/src/Verify.Xunit.Tests/Snippets/ExtensionSample.AtMethod.verified.xml#L1-L5' title='File snippet `Verify.Xunit.Tests/Snippets/ExtensionSample.AtMethod.verified.xml` was extracted from'>snippet source</a> | <a href='#snippet-Verify.Xunit.Tests/Snippets/ExtensionSample.AtMethod.verified.xml' title='Navigate to start of snippet `Verify.Xunit.Tests/Snippets/ExtensionSample.AtMethod.verified.xml`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


## NamerRuntimeAndVersion
Expand All @@ -351,4 +351,4 @@ Debug.WriteLine(Namer.Runtime);
Debug.WriteLine(Namer.RuntimeAndVersion);
```
<sup><a href='/src/Verify.Tests/NamerTests.cs#L47-L50' title='File snippet `accessnamerruntimeandversion` was extracted from'>snippet source</a> | <a href='#snippet-accessnamerruntimeandversion' title='Navigate to start of snippet `accessnamerruntimeandversion`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->
10 changes: 5 additions & 5 deletions docs/parameterised.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public Task InlineDataUsage(string arg)
}
```
<sup><a href='/src/Verify.Xunit.Tests/Snippets/ParametersSample.cs#L10-L20' title='File snippet `xunitinlinedata` was extracted from'>snippet source</a> | <a href='#snippet-xunitinlinedata' title='Navigate to start of snippet `xunitinlinedata`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


### MemberData
Expand All @@ -63,7 +63,7 @@ public static IEnumerable<object[]> GetData()
}
```
<sup><a href='/src/Verify.Xunit.Tests/Snippets/ParametersSample.cs#L22-L37' title='File snippet `xunitmemberdata` was extracted from'>snippet source</a> | <a href='#snippet-xunitmemberdata' title='Navigate to start of snippet `xunitmemberdata`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


### Complex MemberData
Expand Down Expand Up @@ -110,7 +110,7 @@ public class ComplexParametersSample
}
```
<sup><a href='/src/Verify.Xunit.Tests/Snippets/ComplexParametersSample.cs#L7-L43' title='File snippet `xunitcomplexmemberdata` was extracted from'>snippet source</a> | <a href='#snippet-xunitcomplexmemberdata' title='Navigate to start of snippet `xunitcomplexmemberdata`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->

`VerifierSettings.NameForParameter` is required since the parameter type has no `ToString()` override that can be used for deriving the name of the `.verified.` file.

Expand All @@ -131,7 +131,7 @@ public Task TestCaseUsage(string arg)
}
```
<sup><a href='/src/Verify.NUnit.Tests/Snippets/ParametersSample.cs#L8-L15' title='File snippet `nunittestcase` was extracted from'>snippet source</a> | <a href='#snippet-nunittestcase' title='Navigate to start of snippet `nunittestcase`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->


## MSTest
Expand All @@ -155,4 +155,4 @@ public Task DataRowUsage(string arg)
}
```
<sup><a href='/src/Verify.MSTest.Tests/Snippets/ParametersSample.cs#L10-L20' title='File snippet `mstestdatarow` was extracted from'>snippet source</a> | <a href='#snippet-mstestdatarow' title='Navigate to start of snippet `mstestdatarow`'>anchor</a></sup>
<!-- endsnippet -->
<!-- endSnippet -->
2 changes: 1 addition & 1 deletion docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ To change this file edit the source file and then run MarkdownSnippets.
* [Build server](/docs/build-server.md)
* [Comparers](/docs/comparer.md)
* [Converters](/docs/converter.md)
* [Compared to ApprovalTests](/docs/compared-to-approvaltests.md) <!-- end include: doc-index. path: /docs/mdsource/doc-index.include.md -->
* [Compared to ApprovalTests](/docs/compared-to-approvaltests.md) <!-- endInclude -->
Loading

0 comments on commit edfc135

Please sign in to comment.