Last active
October 13, 2018 16:57
-
-
Save sandermvanvliet/36dab8d96a19864ed368dfb71e5ef02f to your computer and use it in GitHub Desktop.
Assertion options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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