Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Dec 11, 2019
1 parent 6276ccb commit 2291985
Show file tree
Hide file tree
Showing 19 changed files with 35 additions and 29 deletions.
4 changes: 2 additions & 2 deletions docs/named-tuples.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static (bool Member1, string Member2, string Member3) MethodWithNamedTuple()
return (true, "A", "B");
}
```
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L170-L177' title='File snippet `methodwithnamedtuple` was extracted from'>snippet source</a> | <a href='#snippet-methodwithnamedtuple' title='Navigate to start of snippet `methodwithnamedtuple`'>anchor</a></sup>
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L171-L178' 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 -->

Can be verified:
Expand All @@ -31,7 +31,7 @@ Can be verified:
```cs
await Verify(() => MethodWithNamedTuple());
```
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L163-L167' title='File snippet `verifytuple` was extracted from'>snippet source</a> | <a href='#snippet-verifytuple' title='Navigate to start of snippet `verifytuple`'>anchor</a></sup>
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L164-L168' 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 -->

Resulting in:
Expand Down
3 changes: 2 additions & 1 deletion docs/scrubbers.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Usage:
<a id='snippet-scrubberssample.cs'/></a>
```cs
using System.Threading.Tasks;
using Verify;
using VerifyXunit;
using Xunit;
using Xunit.Abstractions;
Expand Down Expand Up @@ -69,7 +70,7 @@ public class ScrubbersSample :
}
}
```
<sup><a href='/src/Verify.Xunit.Tests/Scrubbers/ScrubbersSample.cs#L1-L42' title='File snippet `scrubberssample.cs` was extracted from'>snippet source</a> | <a href='#snippet-scrubberssample.cs' title='Navigate to start of snippet `scrubberssample.cs`'>anchor</a></sup>
<sup><a href='/src/Verify.Xunit.Tests/Scrubbers/ScrubbersSample.cs#L1-L43' title='File snippet `scrubberssample.cs` was extracted from'>snippet source</a> | <a href='#snippet-scrubberssample.cs' title='Navigate to start of snippet `scrubberssample.cs`'>anchor</a></sup>
<!-- endsnippet -->

Results:
Expand Down
26 changes: 13 additions & 13 deletions docs/serializer-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var settings = new JsonSerializerSettings
DefaultValueHandling = DefaultValueHandling.Ignore
};
```
<sup><a href='/src/Verify.Xunit/Helpers/SerializationSettings.cs#L153-L162' title='File snippet `defaultserialization` was extracted from'>snippet source</a> | <a href='#snippet-defaultserialization' title='Navigate to start of snippet `defaultserialization`'>anchor</a></sup>
<sup><a href='/src/Verify/SerializationSettings.cs#L152-L161' title='File snippet `defaultserialization` was extracted from'>snippet source</a> | <a href='#snippet-defaultserialization' title='Navigate to start of snippet `defaultserialization`'>anchor</a></sup>
<!-- endsnippet -->


Expand All @@ -72,7 +72,7 @@ To disable this behavior globally use:
```cs
Global.ModifySerialization(settings => settings.DontIgnoreEmptyCollections());
```
<sup><a href='/src/Verify.Xunit.Tests/Snippets/SerializationSettingsSnippets.cs#L9-L11' title='File snippet `dontignoreemptycollections` was extracted from'>snippet source</a> | <a href='#snippet-dontignoreemptycollections' title='Navigate to start of snippet `dontignoreemptycollections`'>anchor</a></sup>
<sup><a href='/src/Verify.Xunit.Tests/Snippets/SerializationSettingsSnippets.cs#L10-L12' title='File snippet `dontignoreemptycollections` was extracted from'>snippet source</a> | <a href='#snippet-dontignoreemptycollections' title='Navigate to start of snippet `dontignoreemptycollections`'>anchor</a></sup>
<!-- endsnippet -->


Expand All @@ -94,7 +94,7 @@ var target = new GuidTarget

await Verify(target);
```
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L127-L140' title='File snippet `guid` was extracted from'>snippet source</a> | <a href='#snippet-guid' title='Navigate to start of snippet `guid`'>anchor</a></sup>
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L128-L141' title='File snippet `guid` was extracted from'>snippet source</a> | <a href='#snippet-guid' title='Navigate to start of snippet `guid`'>anchor</a></sup>
<!-- endsnippet -->

Results in the following:
Expand All @@ -119,7 +119,7 @@ To disable this behavior globally use:
```cs
Global.ModifySerialization(settings => settings.DontScrubGuids());
```
<sup><a href='/src/Verify.Xunit.Tests/Snippets/SerializationSettingsSnippets.cs#L16-L18' title='File snippet `dontscrubguids` was extracted from'>snippet source</a> | <a href='#snippet-dontscrubguids' title='Navigate to start of snippet `dontscrubguids`'>anchor</a></sup>
<sup><a href='/src/Verify.Xunit.Tests/Snippets/SerializationSettingsSnippets.cs#L17-L19' title='File snippet `dontscrubguids` was extracted from'>snippet source</a> | <a href='#snippet-dontscrubguids' title='Navigate to start of snippet `dontscrubguids`'>anchor</a></sup>
<!-- endsnippet -->


Expand All @@ -144,7 +144,7 @@ var target = new DateTimeTarget

await Verify(target);
```
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L563-L579' title='File snippet `date` was extracted from'>snippet source</a> | <a href='#snippet-date' title='Navigate to start of snippet `date`'>anchor</a></sup>
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L564-L580' title='File snippet `date` was extracted from'>snippet source</a> | <a href='#snippet-date' title='Navigate to start of snippet `date`'>anchor</a></sup>
<!-- endsnippet -->

Results in the following:
Expand All @@ -171,7 +171,7 @@ To disable this behavior globally use:
```cs
Global.ModifySerialization(settings => settings.DontScrubDateTimes());
```
<sup><a href='/src/Verify.Xunit.Tests/Snippets/SerializationSettingsSnippets.cs#L23-L25' title='File snippet `dontscrubdatetimes` was extracted from'>snippet source</a> | <a href='#snippet-dontscrubdatetimes' title='Navigate to start of snippet `dontscrubdatetimes`'>anchor</a></sup>
<sup><a href='/src/Verify.Xunit.Tests/Snippets/SerializationSettingsSnippets.cs#L24-L26' title='File snippet `dontscrubdatetimes` was extracted from'>snippet source</a> | <a href='#snippet-dontscrubdatetimes' title='Navigate to start of snippet `dontscrubdatetimes`'>anchor</a></sup>
<!-- endsnippet -->


Expand All @@ -186,7 +186,7 @@ To disable this behavior globally use:
```cs
Global.ModifySerialization(settings => settings.DontIgnoreFalse());
```
<sup><a href='/src/Verify.Xunit.Tests/Snippets/SerializationSettingsSnippets.cs#L30-L32' title='File snippet `dontignorefalse` was extracted from'>snippet source</a> | <a href='#snippet-dontignorefalse' title='Navigate to start of snippet `dontignorefalse`'>anchor</a></sup>
<sup><a href='/src/Verify.Xunit.Tests/Snippets/SerializationSettingsSnippets.cs#L31-L33' title='File snippet `dontignorefalse` was extracted from'>snippet source</a> | <a href='#snippet-dontignorefalse' title='Navigate to start of snippet `dontignorefalse`'>anchor</a></sup>
<!-- endsnippet -->


Expand Down Expand Up @@ -283,7 +283,7 @@ var target = new IgnoreTypeTarget
};
await Verify(target);
```
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L229-L246' title='File snippet `addignoretype` was extracted from'>snippet source</a> | <a href='#snippet-addignoretype' title='Navigate to start of snippet `addignoretype`'>anchor</a></sup>
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L230-L247' title='File snippet `addignoretype` was extracted from'>snippet source</a> | <a href='#snippet-addignoretype' title='Navigate to start of snippet `addignoretype`'>anchor</a></sup>
<!-- endsnippet -->

Result:
Expand Down Expand Up @@ -323,7 +323,7 @@ var target = new IgnoreInstanceTarget
};
await Verify(target);
```
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L195-L212' title='File snippet `addignoreinstance` was extracted from'>snippet source</a> | <a href='#snippet-addignoreinstance' title='Navigate to start of snippet `addignoreinstance`'>anchor</a></sup>
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L196-L213' title='File snippet `addignoreinstance` was extracted from'>snippet source</a> | <a href='#snippet-addignoreinstance' title='Navigate to start of snippet `addignoreinstance`'>anchor</a></sup>
<!-- endsnippet -->

Result:
Expand Down Expand Up @@ -364,7 +364,7 @@ var target = new IgnoreExplicitTarget
};
await Verify(target);
```
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L268-L286' title='File snippet `ignorememberbyexpression` was extracted from'>snippet source</a> | <a href='#snippet-ignorememberbyexpression' title='Navigate to start of snippet `ignorememberbyexpression`'>anchor</a></sup>
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L269-L287' title='File snippet `ignorememberbyexpression` was extracted from'>snippet source</a> | <a href='#snippet-ignorememberbyexpression' title='Navigate to start of snippet `ignorememberbyexpression`'>anchor</a></sup>
<!-- endsnippet -->

Result:
Expand Down Expand Up @@ -404,7 +404,7 @@ var target = new IgnoreExplicitTarget
};
await Verify(target);
```
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L292-L311' title='File snippet `ignorememberbyname` was extracted from'>snippet source</a> | <a href='#snippet-ignorememberbyname' title='Navigate to start of snippet `ignorememberbyname`'>anchor</a></sup>
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L293-L312' title='File snippet `ignorememberbyname` was extracted from'>snippet source</a> | <a href='#snippet-ignorememberbyname' title='Navigate to start of snippet `ignorememberbyname`'>anchor</a></sup>
<!-- endsnippet -->

Result:
Expand Down Expand Up @@ -438,7 +438,7 @@ ModifySerialization(_ => _.IgnoreMembersThatThrow<CustomException>());
var target = new WithCustomException();
await Verify(target);
```
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L338-L345' title='File snippet `ignoremembersthatthrow` was extracted from'>snippet source</a> | <a href='#snippet-ignoremembersthatthrow' title='Navigate to start of snippet `ignoremembersthatthrow`'>anchor</a></sup>
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L339-L346' title='File snippet `ignoremembersthatthrow` was extracted from'>snippet source</a> | <a href='#snippet-ignoremembersthatthrow' title='Navigate to start of snippet `ignoremembersthatthrow`'>anchor</a></sup>
<!-- endsnippet -->

Result:
Expand All @@ -461,7 +461,7 @@ ModifySerialization(_ => _.IgnoreMembersThatThrow<Exception>(x => x.Message == "
var target = new WithExceptionIgnoreMessage();
await Verify(target);
```
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L400-L407' title='File snippet `ignoremembersthatthrowexpression` was extracted from'>snippet source</a> | <a href='#snippet-ignoremembersthatthrowexpression' title='Navigate to start of snippet `ignoremembersthatthrowexpression`'>anchor</a></sup>
<sup><a href='/src/Verify.Xunit.Tests/Tests.cs#L401-L408' title='File snippet `ignoremembersthatthrowexpression` was extracted from'>snippet source</a> | <a href='#snippet-ignoremembersthatthrowexpression' title='Navigate to start of snippet `ignoremembersthatthrowexpression`'>anchor</a></sup>
<!-- endsnippet -->

Result:
Expand Down
1 change: 1 addition & 0 deletions src/Verify.Xunit.Tests/Scrubbers/ScrubbersSample.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Threading.Tasks;
using Verify;
using VerifyXunit;
using Xunit;
using Xunit.Abstractions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using VerifyXunit;
using Verify;
using VerifyXunit;
using Xunit.Abstractions;

public class SerializationSettingsSnippets :
Expand Down
1 change: 1 addition & 0 deletions src/Verify.Xunit.Tests/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.IO;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Verify;
using VerifyXunit;
using Xunit;
using Xunit.Abstractions;
Expand Down
2 changes: 1 addition & 1 deletion src/Verify.Xunit/ApplyScrubbers.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
using VerifyXunit;
using Verify;

static class ApplyScrubbers
{
Expand Down
2 changes: 1 addition & 1 deletion src/Verify.Xunit/FileNameBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.IO;
using System.Text;
using VerifyXunit;
using Verify;

static class FileNameBuilder
{
Expand Down
3 changes: 3 additions & 0 deletions src/Verify.Xunit/Verify.Xunit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@
<ItemGroup>
<ProjectReference Include="..\Verify\Verify.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Helpers\" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions src/Verify.Xunit/VerifyBase_Scrubbers.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using Verify;

namespace VerifyXunit
{
Expand Down
1 change: 1 addition & 0 deletions src/Verify.Xunit/VerifyBase_SerializationSettings.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using Newtonsoft.Json;
using Verify;

namespace VerifyXunit
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace VerifyXunit
namespace Verify
{
public static partial class Global
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;

namespace VerifyXunit
namespace Verify
{
public static partial class Global
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace VerifyXunit
namespace Verify
{
public static partial class Global
{
Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions src/Verify/Scrubbers/DelegateConverter.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System;
using System.Linq;
using Newtonsoft.Json;
using Verify;

namespace VerifyXunit
namespace Verify
{
public class DelegateConverter :
WriteOnlyJsonConverter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace VerifyXunit
namespace Verify
{
public static class Scrubbers
{
Expand Down
3 changes: 1 addition & 2 deletions src/Verify/Scrubbers/StringScrubbingConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
using System.Collections.Generic;
using System.Globalization;
using Newtonsoft.Json;
using Verify;

namespace VerifyXunit
namespace Verify
{
public class StringScrubbingConverter :
WriteOnlyJsonConverter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
using System.Linq.Expressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Verify;

// ReSharper disable UseObjectOrCollectionInitializer

namespace VerifyXunit
namespace Verify
{
public class SerializationSettings
{
Expand Down

0 comments on commit 2291985

Please sign in to comment.