Skip to content

Add Way to Exclude Calls from VerifyNoOtherCalls #1490

Open
@rarcher

Description

@rarcher

When verifying calls on mocks, it often happens that there is some trivial operation (like a property read) that you really don't care about, and the executing code is allowed to invoke any number of times. However, because of the way VerifyNoOtherCalls works, there's no way to mark things as ignored - you have to explicitly specify each individual call, which leads to unit tests either being too tightly coupled to the main code base, or using hackish work-arounds (like doing Times.AtMost(1000)). There ought to be a way to tell Moq that such-and-such a call just isn't relevant.

Back this issue
Back this issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions