-
Notifications
You must be signed in to change notification settings - Fork 722
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
Remove CollectionContainsConstraint #1324
Comments
Would the plan be to use SomeItemsConstraint in Has.Member(), Contains.Item() and Does.Contain() instead? I doubt many people use our constraints directly. Even then, should we deprecate for one release? |
Even simpler: I think there's a benefit to eliminating any unneeded constraints, since I often find my self searching through and comparing those that work in a similar way. It's a time sink. The trick would be to deprecate the constructor of the constraint while avoiding deprecating Has.Member(), etc. Perhaps by adding an internal static factory method for use by the syntax elements. Or we could just not worry about it and remove. :-) |
@rprouse We already discussed this. Shall we move it to Backlog at a low priority? |
I say just not worry and remove. |
There is some code duplication between `DictionaryContainsKeyConstraint` and `DictionaryContainsValueConstraint`, but not much will be saved by extracting `Matches` and `Using` to a helper class. Fixes nunit#1324
See the note at the bottom of this page.
We could do away with the constraint and have all the syntactic elements generate a SomeItemsConstraint. It would remove one small class and a test class from our codebase.
OTOH, if there are people who actually construct the constraint, it would break their code. There can be other things like this under Constraints, so let's decide on whether to keep such code or remove it.
The text was updated successfully, but these errors were encountered: