Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the new DictionaryContainsKeyValuePairConstraint #548

Closed
rprouse opened this issue Feb 6, 2021 · 0 comments · Fixed by #554
Closed

Document the new DictionaryContainsKeyValuePairConstraint #548

rprouse opened this issue Feb 6, 2021 · 0 comments · Fixed by #554
Labels
area:framework help-wanted A place where we could use a helping hand. type:newpage

Comments

@rprouse
Copy link
Member

rprouse commented Feb 6, 2021

NUnit 3.13 adds a DictionaryContainsKeyValuePairConstraint (issue nunit/nunit#3470, PR nunit/nunit#3486 and another issue requesting nunit/nunit#3747)

Syntax is like

var dictionary = new Dictionary<string, string> { { "Hello", "World" }, { "Hola", "Mundo" } };
Assert.That(dictionary, Does.ContainKey("Hola").WithValue("Mundo"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:framework help-wanted A place where we could use a helping hand. type:newpage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant