Skip to content

Extends Verify to allow verification of ZeroLog bits.

License

Notifications You must be signed in to change notification settings

VerifyTests/Verify.ZeroLog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Verify.ZeroLog

Discussions Build status NuGet Status

Extends Verify to allow verification of ZeroLog bits.

See Milestones for release notes.

NuGet package

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

Usage

[ModuleInitializer]
public static void Initialize() =>
    VerifyZeroLog.Initialize();

snippet source | anchor

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

    return Verify(result);
}

static string Method()
{
    var logger = LogManager.GetLogger<Tests>();
    logger.Error("The error");
    logger.Warn("The warning");
    return "Result";
}

snippet source | anchor

Results in:

{
  target: Result,
  log: [
    {
      Error: The error,
      Logger: Tests
    },
    {
      Warn: The warning,
      Logger: Tests
    }
  ]
}

snippet source | anchor

About

Extends Verify to allow verification of ZeroLog bits.

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Contributors 4

  •  
  •  
  •  
  •  

Languages