Shouldly
Search…
Shouldly
Overview
Contributing
Documentation
Getting Started
Configuration
Equality
String
Enumerable
Dictionary
ContainKey
ContainKeyAndValue
Exceptions
SatisfyAllConditions
CompleteIn
DynamicShould
Upgrade 3 to 4
Powered By
GitBook
ContainKey
ShouldContainKey
1
var
websters
=
new
Dictionary
<
string
,
string
>
{
{
"Embiggen"
,
"To empower or embolden."
}
};
2
websters
.
ShouldContainKey
(
"Cromulent"
);
Copied!
snippet source
|
anchor
Exception
1
websters
2
should contain key
3
"Cromulent"
4
but does not
Copied!
ShouldNotContainKey
1
var
websters
=
new
Dictionary
<
string
,
string
>
{
{
"Chazzwazzers"
,
"What Australians would have called a bull frog."
}
};
2
websters
.
ShouldNotContainKey
(
"Chazzwazzers"
);
Copied!
snippet source
|
anchor
Exception
1
websters
2
should not contain key
3
"Chazzwazzers"
4
but does
Copied!
Documentation - Previous
Dictionary
Next
ContainKeyAndValue
Last modified
1yr ago
Copy link
Contents
ShouldContainKey
ShouldNotContainKey