Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add AssertAtMostNumberOfCalls method #1262

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexpantyukhin
Copy link
Contributor

Summary

Add AssertAtMostNumberOfCalls method

Changes

The method AssertAtMostNumberOfCalls was added to the mock.go

Motivation

Related issues

Closes #1257

@@ -629,6 +629,27 @@ func (m *Mock) AssertNumberOfCalls(t TestingT, methodName string, expectedCalls
return assert.Equal(t, expectedCalls, actualCalls, fmt.Sprintf("Expected number of calls (%d) does not match the actual number of calls (%d).", expectedCalls, actualCalls))
}

// AssertAtMostNumberOfCalls asserts that the method was called at most atMostExpectedCalls times.
func (m *Mock) AssertAtMostNumberOfCalls(t TestingT, methodName string, atMostExpectedCalls int) bool {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

03069550990

@dolmen dolmen added enhancement pkg-assert Change related to package testify/assert must-rebase labels Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement must-rebase pkg-assert Change related to package testify/assert
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add AssertAtMostNumberOfCalls method
3 participants