Skip to content

Add xxContains matchers for collection types other than List #157

Open
@fransf-wtax

Description

@fransf-wtax

Is your feature request related to a problem? Please describe.

Stubbing methods that take a Set now requires creating a custom matcher, using the anyObject() matcher (and optionally verifying the set's contents later using argument capturing), or passing in a literal set. It would be useful to have an fflib_Match.setContains just like there is an fflib_Match.listContains.

Describe the solution you'd like

Add a setContains method to fflib_Match. Probably making fflib_MatcherDefinitions.ListContains more general to apply to any kind collection would be a quick way to support both list and sets.

Describe alternatives you've considered

Writing my own custom matcher.
Using anyObject() when stubbing and mock verification with argument capturing.
Using a constant Set instead of a matcher.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions