Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Dec 3, 2023
1 parent 9f78916 commit f5b7499
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 73 deletions.
6 changes: 3 additions & 3 deletions docs/anonymous-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public Task Anon()
});
}
```
<sup><a href='/src/Verify.Xunit.Tests/VerifyObjectSamples.cs#L59-L83' title='Snippet source file'>snippet source</a> | <a href='#snippet-anonxunit' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.Xunit.Tests/VerifyObjectSamples.cs#L46-L70' title='Snippet source file'>snippet source</a> | <a href='#snippet-anonxunit' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand Down Expand Up @@ -68,7 +68,7 @@ public Task Anon()
});
}
```
<sup><a href='/src/Verify.NUnit.Tests/VerifyObjectSamples.cs#L76-L100' title='Snippet source file'>snippet source</a> | <a href='#snippet-anonnunit' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.NUnit.Tests/VerifyObjectSamples.cs#L63-L87' title='Snippet source file'>snippet source</a> | <a href='#snippet-anonnunit' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand Down Expand Up @@ -99,7 +99,7 @@ public Task Anon()
});
}
```
<sup><a href='/src/Verify.MSTest.Tests/VerifyObjectSamples.cs#L71-L95' title='Snippet source file'>snippet source</a> | <a href='#snippet-anonmstest' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.MSTest.Tests/VerifyObjectSamples.cs#L48-L72' title='Snippet source file'>snippet source</a> | <a href='#snippet-anonmstest' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand Down
2 changes: 1 addition & 1 deletion docs/build-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,5 @@ if (BuildServerDetector.Detected)
});
}
```
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L62-L76' title='Snippet source file'>snippet source</a> | <a href='#snippet-derivepathinfoappveyor' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L84-L98' title='Snippet source file'>snippet source</a> | <a href='#snippet-derivepathinfoappveyor' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->
2 changes: 1 addition & 1 deletion docs/clipboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The clipboard behavior can be enabled using the following:
```cs
ClipboardAccept.Enable();
```
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L8-L12' title='Snippet source file'>snippet source</a> | <a href='#snippet-enableclipboard' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L30-L34' title='Snippet source file'>snippet source</a> | <a href='#snippet-enableclipboard' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand Down
22 changes: 7 additions & 15 deletions docs/serializer-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -493,23 +493,15 @@ settings.DontScrubGuids();
settings.DontScrubDateTimes();
await Verify(target, settings);
```
<sup><a href='/src/Verify.MSTest.Tests/VerifyObjectSamples.cs#L15-L23' title='Snippet source file'>snippet source</a> | <a href='#snippet-changedefaultsperverification' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L8-L16' title='Snippet source file'>snippet source</a> | <a href='#snippet-changedefaultsperverification' title='Start of snippet'>anchor</a></sup>
<a id='snippet-changedefaultsperverification-1'></a>
```cs
await Verify(target)
.DontIgnoreEmptyCollections()
.DontScrubGuids()
.DontScrubDateTimes();
```
<sup><a href='/src/Verify.MSTest.Tests/VerifyObjectSamples.cs#L25-L32' title='Snippet source file'>snippet source</a> | <a href='#snippet-changedefaultsperverification-1' title='Start of snippet'>anchor</a></sup>
<a id='snippet-changedefaultsperverification-2'></a>
```cs
await Verify(target)
.DontIgnoreEmptyCollections()
.DontScrubGuids()
.DontScrubDateTimes();
```
<sup><a href='/src/Verify.NUnit.Tests/VerifyObjectSamples.cs#L13-L20' title='Snippet source file'>snippet source</a> | <a href='#snippet-changedefaultsperverification-2' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L17-L24' title='Snippet source file'>snippet source</a> | <a href='#snippet-changedefaultsperverification-1' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand All @@ -526,7 +518,7 @@ Extra Json.NET settings can be made:
VerifierSettings.AddExtraSettings(
_ => _.TypeNameHandling = TypeNameHandling.All);
```
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L104-L109' title='Snippet source file'>snippet source</a> | <a href='#snippet-extrasettingsglobal' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L126-L131' title='Snippet source file'>snippet source</a> | <a href='#snippet-extrasettingsglobal' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand All @@ -539,7 +531,7 @@ var settings = new VerifySettings();
settings.AddExtraSettings(
_ => _.TypeNameHandling = TypeNameHandling.All);
```
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L111-L117' title='Snippet source file'>snippet source</a> | <a href='#snippet-extrasettingsinstance' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L133-L139' title='Snippet source file'>snippet source</a> | <a href='#snippet-extrasettingsinstance' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand All @@ -557,7 +549,7 @@ class CompanyConverter :
writer.WriteMember(company, company.Name, "Name");
}
```
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L131-L140' title='Snippet source file'>snippet source</a> | <a href='#snippet-companyconverter' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L153-L162' title='Snippet source file'>snippet source</a> | <a href='#snippet-companyconverter' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

<!-- snippet: JsonConverter -->
Expand All @@ -566,7 +558,7 @@ class CompanyConverter :
VerifierSettings.AddExtraSettings(
_ => _.Converters.Add(new CompanyConverter()));
```
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L123-L128' title='Snippet source file'>snippet source</a> | <a href='#snippet-jsonconverter' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L145-L150' title='Snippet source file'>snippet source</a> | <a href='#snippet-jsonconverter' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand Down Expand Up @@ -1699,7 +1691,7 @@ Extra types can be added to this mapping:
VerifierSettings.TreatAsString<ClassWithToString>(
(target, settings) => target.Property);
```
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L44-L49' title='Snippet source file'>snippet source</a> | <a href='#snippet-treatasstring' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L66-L71' title='Snippet source file'>snippet source</a> | <a href='#snippet-treatasstring' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand Down
6 changes: 3 additions & 3 deletions docs/verify-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This can be done using `AutoVerify()`:
var settings = new VerifySettings();
settings.AutoVerify();
```
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L82-L87' title='Snippet source file'>snippet source</a> | <a href='#snippet-autoverify' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L104-L109' title='Snippet source file'>snippet source</a> | <a href='#snippet-autoverify' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

Or globally
Expand Down Expand Up @@ -74,7 +74,7 @@ public Task OnHandlersSample()
return Verify("value");
}
```
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L15-L39' title='Snippet source file'>snippet source</a> | <a href='#snippet-onhandlers' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L37-L61' title='Snippet source file'>snippet source</a> | <a href='#snippet-onhandlers' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand All @@ -93,5 +93,5 @@ To disable diff launching:
var settings = new VerifySettings();
settings.DisableDiff();
```
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L93-L98' title='Snippet source file'>snippet source</a> | <a href='#snippet-disablediff' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L115-L120' title='Snippet source file'>snippet source</a> | <a href='#snippet-disablediff' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ await Verify(
Bars = await repo.GetBars(id),
});
```
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L153-L162' title='Snippet source file'>snippet source</a> | <a href='#snippet-verifyfuncoftaskoft' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.Tests/Snippets/Snippets.cs#L175-L184' title='Snippet source file'>snippet source</a> | <a href='#snippet-verifyfuncoftaskoft' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand Down
23 changes: 0 additions & 23 deletions src/Verify.MSTest.Tests/VerifyObjectSamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,6 @@ namespace TheTests;
public class VerifyObjectSamples :
VerifyBase
{
// ReSharper disable once UnusedMember.Local
async Task ChangeDefaultsPerVerification(object target)
{
#region ChangeDefaultsPerVerification

var settings = new VerifySettings();
settings.DontIgnoreEmptyCollections();
settings.DontScrubGuids();
settings.DontScrubDateTimes();
await Verify(target, settings);

#endregion

#region ChangeDefaultsPerVerification

await Verify(target)
.DontIgnoreEmptyCollections()
.DontScrubGuids()
.DontScrubDateTimes();

#endregion
}

[TestMethod]
public Task ScopedSerializer()
{
Expand Down
13 changes: 0 additions & 13 deletions src/Verify.NUnit.Tests/VerifyObjectSamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,6 @@
[TestFixture]
public class VerifyObjectSamples
{
// ReSharper disable once UnusedMember.Local
async Task ChangeDefaultsPerVerification(object target)
{
#region ChangeDefaultsPerVerification

await Verify(target)
.DontIgnoreEmptyCollections()
.DontScrubGuids()
.DontScrubDateTimes();

#endregion
}

[Test]
public Task ScopedSerializer()
{
Expand Down
22 changes: 22 additions & 0 deletions src/Verify.Tests/Snippets/Snippets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

public class Snippets
{
// ReSharper disable once UnusedMember.Local
async Task ChangeDefaultsPerVerification(object target)
{
#region ChangeDefaultsPerVerification

var settings = new VerifySettings();
settings.DontIgnoreEmptyCollections();
settings.DontScrubGuids();
settings.DontScrubDateTimes();
await Verify(target, settings);

#endregion
#region ChangeDefaultsPerVerification

await Verify(target)
.DontIgnoreEmptyCollections()
.DontScrubGuids()
.DontScrubDateTimes();

#endregion
}

// ReSharper disable once UnusedMember.Local
void EnableClipboard()
{
Expand Down
13 changes: 0 additions & 13 deletions src/Verify.Xunit.Tests/VerifyObjectSamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,6 @@
[UsesVerify]
public class VerifyObjectSamples
{
// ReSharper disable once UnusedMember.Local
async Task ChangeDefaultsPerVerification(object target)
{
#region ChangeDefaultsPerVerificationXunit

var settings = new VerifySettings();
settings.DontIgnoreEmptyCollections();
settings.DontScrubGuids();
settings.DontScrubDateTimes();
await Verify(target, settings);

#endregion
}

[Fact]
public Task ScopedSerializer()
Expand Down

0 comments on commit f5b7499

Please sign in to comment.