Skip to content

DictionaryContainsKeyValuePairConstraint supports generic IDictionary - #4014

Merged
mikkelbu merged 4 commits into
nunit:masterfrom
louis-z:issue-3964
Dec 8, 2021
Merged

DictionaryContainsKeyValuePairConstraint supports generic IDictionary#4014
mikkelbu merged 4 commits into
nunit:masterfrom
louis-z:issue-3964

Conversation

@louis-z

@louis-z louis-z commented Dec 3, 2021

Copy link
Copy Markdown
Contributor
  • Adapt DictionaryContainsKeyValuePairConstraint so that it works with types that implement
    • IDictionary<TKey, TValue> but
    • not IDictionary
  • For backward compatibility, keep throwing same exception with same message as before when a failures occurs

Fixes #3964

@mikkelbu mikkelbu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me @louis-z. Thanks for the contribution. We will need one more review before merging this.

…nary

- Adapt DictionaryContainsKeyValuePairConstraint so that it works with types that implement
  - IDictionary<TKey, TValue> but
  - not IDictionary
- For backward compatibility, keep throwing same exceptions with same messages when failures arise
@louis-z

louis-z commented Dec 7, 2021

Copy link
Copy Markdown
Contributor Author

Looks good to me @louis-z. Thanks for the contribution. We will need one more review before merging this.

No problem, I was glad to help. 😉
I just added an assertion to my test, to make sure that looking up a non-existent KeyValuePair also works.

@mikkelbu
mikkelbu merged commit 004e04a into nunit:master Dec 8, 2021
@louis-z
louis-z deleted the issue-3964 branch December 9, 2021 12:37
rprouse added a commit that referenced this pull request Feb 21, 2023
Backport PR #4014 to fix Issue #3964 (DictionaryContainsKeyValuePairConstraint supports generic IDictionary)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DictionaryContainsKeyValuePairConstraint doesn't work with IDictionary<TKey, TValue>

3 participants