Skip to content

Commit b26adef

Browse files
committed
.
1 parent 5b73a01 commit b26adef

File tree

8 files changed

+777
-1012
lines changed

8 files changed

+777
-1012
lines changed

docs/intro.include.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Extends [Verify](https://github.com/VerifyTests/Verify) to enable scrubbing of Universally Unique Lexicographically Sortable Identifiers via [Ulid](https://github.com/Cysharp/Ulid) package.
1+
Extends [Verify](https://github.com/VerifyTests/Verify) to enable snapshotting of emails via [EmailPreviewDervices](https://emailpreviewservices.com).

docs/zzz.include.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
### Entity Framework Extensions
22

3-
[Entity Framework Extensions](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=Verify.Ulid) is a major sponsor and is proud to contribute to the development this project.
3+
[Entity Framework Extensions](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=Verify.EmailPreviewServices) is a major sponsor and is proud to contribute to the development this project.
44

5-
[![Entity Framework Extensions](https://raw.githubusercontent.com/VerifyTests/Verify.Ulid/refs/heads/main/docs/zzz.png)](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=Verify.Ulid)
5+
[![Entity Framework Extensions](https://raw.githubusercontent.com/VerifyTests/Verify.EmailPreviewServices/refs/heads/main/docs/zzz.png)](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=Verify.EmailPreviewServices)

readme.md

Lines changed: 5 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# <img src="/src/icon.png" height="30px"> Verify.Ulid
1+
# <img src="/src/icon.png" height="30px"> Verify.EmailPreviewServices
22

33
[![Discussions](https://img.shields.io/badge/Verify-Discussions-yellow?svg=true&label=)](https://github.com/orgs/VerifyTests/discussions)
44
[![Build status](https://ci.appveyor.com/api/projects/status/soell7l73pbakm8u?svg=true)](https://ci.appveyor.com/project/SimonCropp/Verify-Ulid)
5-
[![NuGet Status](https://img.shields.io/nuget/v/Verify.Ulid.svg)](https://www.nuget.org/packages/Verify.Ulid/)
5+
[![NuGet Status](https://img.shields.io/nuget/v/Verify.EmailPreviewServices.svg)](https://www.nuget.org/packages/Verify.EmailPreviewServices/)
66

77
Extends [Verify](https://github.com/VerifyTests/Verify) to enable scrubbing of Universally Unique Lexicographically Sortable Identifiers via [Ulid](https://github.com/Cysharp/Ulid) package.<!-- singleLineInclude: intro. path: /docs/intro.include.md -->
88

@@ -14,125 +14,18 @@ Extends [Verify](https://github.com/VerifyTests/Verify) to enable scrubbing of U
1414

1515
### Entity Framework Extensions<!-- include: zzz. path: /docs/zzz.include.md -->
1616

17-
[Entity Framework Extensions](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=Verify.Ulid) is a major sponsor and is proud to contribute to the development this project.
17+
[Entity Framework Extensions](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=Verify.EmailPreviewServices) is a major sponsor and is proud to contribute to the development this project.
1818

19-
[![Entity Framework Extensions](https://raw.githubusercontent.com/VerifyTests/Verify.Ulid/refs/heads/main/docs/zzz.png)](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=Verify.Ulid)<!-- endInclude -->
19+
[![Entity Framework Extensions](https://raw.githubusercontent.com/VerifyTests/Verify.EmailPreviewServices/refs/heads/main/docs/zzz.png)](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=Verify.EmailPreviewServices)<!-- endInclude -->
2020

2121

2222
## NuGet
2323

24-
* https://nuget.org/packages/Verify.Ulid
24+
* https://nuget.org/packages/Verify.EmailPreviewServices
2525

2626

2727
## Usage
2828

29-
Call `VerifyUlid.Initialize()` once at assembly load time.
30-
31-
<!-- snippet: Initialize -->
32-
<a id='snippet-Initialize'></a>
33-
```cs
34-
[ModuleInitializer]
35-
public static void Init() =>
36-
VerifyUlid.Initialize();
37-
```
38-
<sup><a href='/src/Tests/ModuleInitializer.cs#L3-L9' title='Snippet source file'>snippet source</a> | <a href='#snippet-Initialize' title='Start of snippet'>anchor</a></sup>
39-
<!-- endSnippet -->
40-
41-
42-
ULIDs will then be scrubbed:
43-
44-
<!-- snippet: Nested -->
45-
<a id='snippet-Nested'></a>
46-
```cs
47-
[Test]
48-
public Task UlidScrubbing()
49-
{
50-
var id = Ulid.NewUlid();
51-
var target = new Person
52-
{
53-
Id = id,
54-
Name = "Sarah",
55-
Description = $"Sarah ({id})"
56-
};
57-
return Verify(target);
58-
}
59-
```
60-
<sup><a href='/src/Tests/Samples.cs#L93-L108' title='Snippet source file'>snippet source</a> | <a href='#snippet-Nested' title='Start of snippet'>anchor</a></sup>
61-
<!-- endSnippet -->
62-
63-
Result:
64-
65-
<!-- snippet: Samples.UlidScrubbing.verified.txt -->
66-
<a id='snippet-Samples.UlidScrubbing.verified.txt'></a>
67-
```txt
68-
{
69-
Id: Ulid_1,
70-
Name: Sarah,
71-
Description: Sarah (Ulid_1)
72-
}
73-
```
74-
<sup><a href='/src/Tests/Samples.UlidScrubbing.verified.txt#L1-L5' title='Snippet source file'>snippet source</a> | <a href='#snippet-Samples.UlidScrubbing.verified.txt' title='Start of snippet'>anchor</a></sup>
75-
<!-- endSnippet -->
76-
77-
78-
## Disabling Scrubbing
79-
80-
To disable scrubbing use `DontScrubUlids()`
81-
82-
<!-- snippet: DontScrub -->
83-
<a id='snippet-DontScrub'></a>
84-
```cs
85-
[Test]
86-
public Task DontScrubFluent()
87-
{
88-
var id = Ulid.Parse("01JGXG0GDGQEP47CBQ65E50HYH");
89-
var target = new Person
90-
{
91-
Id = id,
92-
Name = "Sarah",
93-
Description = $"Sarah ({id})"
94-
};
95-
return Verify(target)
96-
.DontScrubUlids();
97-
}
98-
99-
[Test]
100-
public Task DontScrubInstance()
101-
{
102-
var id = Ulid.Parse("01JGXG0GDGQEP47CBQ65E50HYH");
103-
var target = new Person
104-
{
105-
Id = id,
106-
Name = "Sarah",
107-
Description = $"Sarah ({id})"
108-
};
109-
var settings = new VerifySettings();
110-
settings.DontScrubUlids();
111-
return Verify(target, settings);
112-
}
113-
```
114-
<sup><a href='/src/Tests/Samples.cs#L60-L91' title='Snippet source file'>snippet source</a> | <a href='#snippet-DontScrub' title='Start of snippet'>anchor</a></sup>
115-
<!-- endSnippet -->
116-
117-
Result:
118-
119-
<!-- snippet: Samples.DontScrubInstance.verified.txt -->
120-
<a id='snippet-Samples.DontScrubInstance.verified.txt'></a>
121-
```txt
122-
{
123-
Id: 01JGXG0GDGQEP47CBQ65E50HYH,
124-
Name: Sarah,
125-
Description: Sarah (01JGXG0GDGQEP47CBQ65E50HYH)
126-
}
127-
```
128-
<sup><a href='/src/Tests/Samples.DontScrubInstance.verified.txt#L1-L5' title='Snippet source file'>snippet source</a> | <a href='#snippet-Samples.DontScrubInstance.verified.txt' title='Start of snippet'>anchor</a></sup>
129-
<!-- endSnippet -->
130-
131-
132-
## Notes
133-
134-
* https://github.com/RicoSuter/NSwag?tab=readme-ov-file
135-
* https://github.com/RicoSuter/NSwag/wiki/CommandLine
13629

13730
## Icon
13831

0 commit comments

Comments
 (0)