Skip to content

Use ConstraintUtils.RequireActual through out the codebase #2497

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

Closed
mikkelbu opened this issue Oct 17, 2017 · 3 comments
Closed

Use ConstraintUtils.RequireActual through out the codebase #2497

mikkelbu opened this issue Oct 17, 2017 · 3 comments

Comments

@mikkelbu
Copy link
Member

In #2489 we introduced a new helper method ConstraintUtils.RequireActual to verify that a given instance is a given type. The method was used in CollectionConstraint (https://github.com/nunit/nunit/pull/2489/files#diff-0bd8c864e13609fb56985f6d45dcd0d7R73) and CollectionEquivalentConstraint (https://github.com/nunit/nunit/pull/2489/files#diff-511119f00b739abcc41ccb36df45f89fR98), but we have other places were we could also use this method. At least we should use the method in the following places:

  • src/NUnitFramework/framework/Constraints/SomeItemsConstraint.cs
  • src/NUnitFramework/framework/Constraints/NoItemConstraint.cs
  • src/NUnitFramework/framework/Constraints/AllItemsConstraint.cs
  • src/NUnitFramework/framework/Constraints/ExactCountConstraint.cs
  • src/NUnitFramework/framework/Constraints/DictionaryContainsKeyConstraint.cs
  • src/NUnitFramework/framework/Constraints/DictionaryContainsValueConstraint.cs

Please add tests if any of the places above is not covered by tests.

@GuillaumeErb
Copy link
Contributor

I'll take this if possible

@jnm2
Copy link
Contributor

jnm2 commented Oct 17, 2017

Welcome! That was quick! 😄

@jnm2 jnm2 removed the help wanted label Oct 17, 2017
@mikkelbu
Copy link
Member Author

Fixed by #2503
Thanks for the work @Breemua 👍

@mikkelbu mikkelbu added this to the 3.9 milestone Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants