Skip to content

Document .Between() and .Times() verification count methods#435

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/document-verification-count-methods
Closed

Document .Between() and .Times() verification count methods#435
Copilot wants to merge 2 commits into
mainfrom
copilot/document-verification-count-methods

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 31, 2026

Two verification count methods were implemented but undocumented: .Between(min, max) for inclusive range verification and .Times(predicate) for custom predicate-based verification.

Changes

  • Added .Between(min, max) and .Times(predicate) to supported call count verifications list in README.md and Docs/pages/04-verify-interactions.md
  • Added usage examples demonstrating both methods

Examples

// Between min and max (inclusive)
sut.VerifyMock.Invoked.Dispense(It.IsAny<string>(), It.IsAny<int>())
    .Between(3, 5);

// Custom predicate
sut.VerifyMock.Invoked.Dispense(It.IsAny<string>(), It.IsAny<int>())
    .Times(count => count % 2 == 0);  // Even number of calls
Original prompt

This section details on the original issue you should resolve

<issue_title>Document additional verification count methods</issue_title>
<issue_description>## Description

Some verification count methods are missing from the documentation.

Missing Documentation

  • .Between(min, max) - Between min and max times (inclusive)
  • .Times(Func<int, bool>) - Custom predicate verification

Suggested Documentation

Add these methods to the "Verify interactions" section under supported call count verifications:

- `.Between(min, max)` - Between min and max times (inclusive)
- `.Times(predicate)` - Custom predicate

**Examples:**

```csharp
// Between min and max (inclusive)
sut.VerifyMock.Invoked.Dispense(It.IsAny<string>(), It.IsAny<int>())
    .Between(3, 5);

// Custom predicate
sut.VerifyMock.Invoked.Dispense(It.IsAny<string>(), It.IsAny<int>())
    .Times(count => count % 2 == 0);  // Even number of calls

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: vbreuss <3438234+vbreuss@users.noreply.github.com>
Copilot AI changed the title [WIP] Document additional verification count methods Document .Between() and .Times() verification count methods Jan 31, 2026
Copilot AI requested a review from vbreuss January 31, 2026 09:16
@vbreuss
Copy link
Copy Markdown
Member

vbreuss commented Jan 31, 2026

Obsolete by #438

@vbreuss vbreuss closed this Jan 31, 2026
@vbreuss vbreuss deleted the copilot/document-verification-count-methods branch February 5, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document additional verification count methods

2 participants