An open API service indexing awesome lists of open source software.

https://github.com/verifytests/verify.zerolog

Extends Verify to allow verification of ZeroLog bits.
https://github.com/verifytests/verify.zerolog

Last synced: about 1 year ago
JSON representation

Extends Verify to allow verification of ZeroLog bits.

Awesome Lists containing this project

README

          

# Verify.ZeroLog

[![Discussions](https://img.shields.io/badge/Verify-Discussions-yellow?svg=true&label=)](https://github.com/orgs/VerifyTests/discussions)
[![Build status](https://ci.appveyor.com/api/projects/status/3oa1pc52a38ncma6?svg=true)](https://ci.appveyor.com/project/SimonCropp/verify-zerolog)
[![NuGet Status](https://img.shields.io/nuget/v/Verify.ZeroLog.svg)](https://www.nuget.org/packages/Verify.ZeroLog/)

Extends [Verify](https://github.com/VerifyTests/Verify) to allow verification of [ZeroLog](https://github.com/Abc-Arbitrage/ZeroLog) bits.

**See [Milestones](../../milestones?state=closed) for release notes.**

## NuGet package

https://nuget.org/packages/Verify.ZeroLog/

## Usage


```cs
[ModuleInitializer]
public static void Initialize() =>
VerifyZeroLog.Initialize();
```
snippet source | anchor


```cs
[Fact]
public Task Usage()
{
Recording.Start();
var result = Method();

return Verify(result);
}

static string Method()
{
var logger = LogManager.GetLogger();
logger.Error("The error");
logger.Warn("The warning");
return "Result";
}
```
snippet source | anchor

Results in:


```txt
{
target: Result,
log: [
{
Error: The error,
Logger: Tests
},
{
Warn: The warning,
Logger: Tests
}
]
}
```
snippet source | anchor