Shouldly
Search
K

ContainKey

ShouldContainKey

var websters = new Dictionary<string, string> { { "Embiggen", "To empower or embolden." } };
websters.ShouldContainKey("Cromulent");
Exception
websters
should contain key
"Cromulent"
but does not

ShouldNotContainKey

var websters = new Dictionary<string, string> { { "Chazzwazzers", "What Australians would have called a bull frog." } };
websters.ShouldNotContainKey("Chazzwazzers");
Exception
websters
should not contain key
"Chazzwazzers"
but does