Skip to content

Instantly share code, notes, and snippets.

@sandermvanvliet
Last active October 13, 2018 16:57
Show Gist options
  • Save sandermvanvliet/36dab8d96a19864ed368dfb71e5ef02f to your computer and use it in GitHub Desktop.
Save sandermvanvliet/36dab8d96a19864ed368dfb71e5ef02f to your computer and use it in GitHub Desktop.
Assertion options
public class Tests
{
public void Option_One()
{
_sink
.Should()
.HaveMessage("Hello world")
.AppearsOnce()
.WithLevel(LogEventLevel.Warning);
}
public void Option_Two()
{
_sink
.Should()
.HaveMessage("Hello world")
.And
.AppearsOnce()
.And
.WithLevel(LogEventLevel.Warning);
}
public void Option_Three()
{
_sink
.Should()
.HaveMessage("Hello, World")
.Which
.AppearsOnce()
.Which
.Should()
.WithLevel(LogEventLevel.Warning);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment