https://github.com/verifytests/verify.serilog
Extends Verify to allow verification of Serilog bits.
https://github.com/verifytests/verify.serilog
Last synced: 3 months ago
JSON representation
Extends Verify to allow verification of Serilog bits.
- Host: GitHub
- URL: https://github.com/verifytests/verify.serilog
- Owner: VerifyTests
- License: mit
- Created: 2022-11-06T23:24:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-28T11:22:33.000Z (about 2 years ago)
- Last Synced: 2024-05-01T09:37:55.842Z (about 2 years ago)
- Language: C#
- Homepage:
- Size: 265 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
- License: license.txt
- Code of conduct: code_of_conduct.md
Awesome Lists containing this project
README
#
Verify.Serilog
[](https://github.com/orgs/VerifyTests/discussions)
[](https://ci.appveyor.com/project/SimonCropp/verify-serilog)
[](https://www.nuget.org/packages/Verify.Serilog/)
Extends [Verify](https://github.com/VerifyTests/Verify) to allow verification of [Serilog](https://serilog.net/) bits.
**See [Milestones](../../milestones?state=closed) for release notes.**
## NuGet package
https://nuget.org/packages/Verify.Serilog/
## Usage
```cs
[ModuleInitializer]
public static void Initialize() =>
VerifySerilog.Initialize();
```
snippet source | anchor
```cs
[Fact]
public Task Usage()
{
Recording.Start();
var result = Method();
return Verify(result);
}
static string Method()
{
Log.Error("The Message");
return "Result";
}
```
snippet source | anchor
Results in:
```txt
{
target: Result,
log: {
Error: The Message
}
}
```
snippet source | anchor