Skip to content

Commit

Permalink
doco
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Dec 2, 2019
1 parent 4c15a93 commit d2f5666
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/compared-to-approvaltests.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ When a test fails verification:
* The command to accept the new verified is copied to the clipboard.
* The difference between the received and verified files is displayed in a diff tool.

In ApprovalTests both these features are opt-in through a attributes.
In ApprovalTests both these features are opt-in through attributes.
2 changes: 1 addition & 1 deletion docs/mdsource/compared-to-approvaltests.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ When a test fails verification:
* The command to accept the new verified is copied to the clipboard.
* The difference between the received and verified files is displayed in a diff tool.

In ApprovalTests both these features are opt-in through a attributes.
In ApprovalTests both these features are opt-in through attributes.
2 changes: 1 addition & 1 deletion docs/mdsource/readme.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
* [Scrubbers](scrubbers.md)
* [Diff Tool](diff-tool.md)
* [Using anonymous types](anonymous-types.md)
* [Compared To ApprovalTests](compared-to-approvaltests.md)
* [Compared oo ApprovalTests](compared-to-approvaltests.md)
4 changes: 2 additions & 2 deletions docs/mdsource/scrubbers.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ They can be defined at three levels:

Multiple scrubbers can bee defined at each level.

Scrubber are excited in reveres order. So the most recent added method scrubber through to earlies added global scrubber.
Scrubber are excited in reveres order. So the most recent added method scrubber through to earliest added global scrubber.

Global scrubbers should be defined only once at appdomain startup.
Global scrubbers should be defined only once at appdomain startup. In this example the scrubber is configured using the [Global Setup](https://github.com/SimonCropp/XunitContext#global-setup) of [XunitContext](https://github.com/SimonCropp/XunitContext). It could also be configured using a [Module Initializer](https://github.com/Fody/ModuleInit).

Usage:

Expand Down
2 changes: 1 addition & 1 deletion docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ To change this file edit the source file and then run MarkdownSnippets.
* [Scrubbers](scrubbers.md)
* [Diff Tool](diff-tool.md)
* [Using anonymous types](anonymous-types.md)
* [Compared To ApprovalTests](compared-to-approvaltests.md)
* [Compared oo ApprovalTests](compared-to-approvaltests.md)
11 changes: 6 additions & 5 deletions docs/scrubbers.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ They can be defined at three levels:

Multiple scrubbers can bee defined at each level.

Scrubber are excited in reveres order. So the most recent added method scrubber through to earlies added global scrubber.
Scrubber are excited in reveres order. So the most recent added method scrubber through to earliest added global scrubber.

Global scrubbers should be defined only once at appdomain startup.
Global scrubbers should be defined only once at appdomain startup. In this example the scrubber is configured using the [Global Setup](https://github.com/SimonCropp/XunitContext#global-setup) of [XunitContext](https://github.com/SimonCropp/XunitContext). It could also be configured using a [Module Initializer](https://github.com/Fody/ModuleInit).

Usage:

Expand Down Expand Up @@ -59,16 +59,17 @@ public class ScrubbersSample :
AddScrubber(s => s.Replace("Three", "C"));
}

public static class ModuleInitializer
[GlobalSetUp]
public static class GlobalSetup
{
public static void Initialize()
public static void Setup()
{
Global.AddScrubber(s => s.Replace("One", "A"));
}
}
}
```
<sup>[snippet source](/src/Verify.Xunit.Tests/Scrubbers/ScrubbersSample.cs#L1-L41) / [anchor](#snippet-scrubberssample.cs)</sup>
<sup>[snippet source](/src/Verify.Xunit.Tests/Scrubbers/ScrubbersSample.cs#L1-L42) / [anchor](#snippet-scrubberssample.cs)</sup>
<!-- endsnippet -->

Results:
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Verification tool to enable simple approval of complex models using [Json.net](h
* [Scrubbers](docs/scrubbers.md)
* [Diff Tool](docs/diff-tool.md)
* [Using anonymous types](docs/anonymous-types.md)
* [Compared To ApprovalTests](docs/compared-to-approvaltests.md)
* [Compared to ApprovalTests](docs/compared-to-approvaltests.md)


## NuGet package
Expand Down
2 changes: 1 addition & 1 deletion readme.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ toc
* [Scrubbers](docs/scrubbers.md)
* [Diff Tool](docs/diff-tool.md)
* [Using anonymous types](docs/anonymous-types.md)
* [Compared To ApprovalTests](docs/compared-to-approvaltests.md)
* [Compared to ApprovalTests](docs/compared-to-approvaltests.md)


## NuGet package
Expand Down
3 changes: 0 additions & 3 deletions src/Verify.Xunit.Tests/FodyWeavers.xml

This file was deleted.

5 changes: 3 additions & 2 deletions src/Verify.Xunit.Tests/Scrubbers/ScrubbersSample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ public ScrubbersSample(ITestOutputHelper output) :
AddScrubber(s => s.Replace("Three", "C"));
}

public static class ModuleInitializer
[GlobalSetUp]
public static class GlobalSetup
{
public static void Initialize()
public static void Setup()
{
Global.AddScrubber(s => s.Replace("One", "A"));
}
Expand Down
2 changes: 0 additions & 2 deletions src/Verify.Xunit.Tests/Verify.Xunit.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Fody" Version="6.0.5" PrivateAssets="all" />
<PackageReference Include="Microsoft.CSharp" Version="4.6.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="MarkdownSnippets.MsBuild" Version="17.0.1" PrivateAssets="all" />
<PackageReference Include="ModuleInit.Fody" Version="2.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
Expand Down

0 comments on commit d2f5666

Please sign in to comment.