Skip to content

Remove CollectionContainsConstraint #1324

Description

@CharliePoole

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.

Activity

  1. added this to the milestone on Mar 7, 2016
  2. rprouse commented on Mar 8, 2016

    @rprouse
    Member

    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?

  3. CharliePoole commented on Mar 8, 2016

    @CharliePoole
    MemberAuthor

    Even simpler: return Has.Some.EqualTo(expected)

    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. :-)

  4. modified the milestone: on Jun 24, 2016
  5. CharliePoole commented on Nov 20, 2016

    @CharliePoole
    MemberAuthor

    @rprouse We already discussed this. Shall we move it to Backlog at a low priority?

  6. rprouse commented on Nov 20, 2016

    @rprouse
    Member

    I say just not worry and remove.

  7. added a commit that references this issue on Jun 10, 2017
    aa19bd1
  8. added this to the 3.8 milestone on Aug 26, 2017
  9. changed the title [-]Remove CollectionContainsConstraint?[/-] [+]Remove CollectionContainsConstraint[/+] on Aug 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions