Add IEnumeratable<KVP> support for ContainsKey(...).WithValue(...)#4854
Conversation
IEnumeratable<KVP> for ContainsKey(...).WithValue(...)IEnumeratable<KVP>support for ContainsKey(...).WithValue(...)
IEnumeratable<KVP>support for ContainsKey(...).WithValue(...)IEnumeratable<KVP> support for ContainsKey(...).WithValue(...)
manfred-brands
left a comment
There was a problem hiding this comment.
The test that fails (DictionaryContainsKeyValuePairConstraintTests.FailsWhenNotUsedAgainstADictionary) is one that expects the code to fail if it isn't an IDictionary.
The test uses an List<KeyValuePair<,>>` which is the support you added.
Rewrite that test to pass or delete it as you already made a new test.
|
I fixed the failing test, having a decent error message is still a good test to have. Things look a lot neater with the suggestions implemented. |
manfred-brands
left a comment
There was a problem hiding this comment.
@RenderMichael Most of it looks good now.
Only item I have is the dropping of IDictionary in the exceptions.
Please put that back in.
|
The error message has been fixed to refer to non-generic |
manfred-brands
left a comment
There was a problem hiding this comment.
@RenderMichael Thanks for your contribution. Looks good now.
Fixes #4852