Skip to content

Matching Lists with Iterables #186

@tomaine2002

Description

@tomaine2002

The DeepCollectionEquality class used for argument matching intentionally does not consider a List equivalent to a non-list Iterable, even if they have the same elements in the same order.

Generally, the test isn't interested in whether the system under test passes a List or some other Iterable. Instead, the test just wants to verify the Iterable has the expected elements in the expected order.

The simple way to specify the expected iterable argument is to use a List with the expected values, in the expected order. However, if the system under test passes an Iterable that is not a list, the stub will never match.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onS2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions