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

Allow expected counter for concrete controller's method #66

Closed
CyganFx opened this issue Nov 30, 2022 · 1 comment
Closed

Allow expected counter for concrete controller's method #66

CyganFx opened this issue Nov 30, 2022 · 1 comment

Comments

@CyganFx
Copy link

CyganFx commented Nov 30, 2022

Hi, I think there is an often case when we need to set expected times that concrete controller method will be executed during the test. Currently, <method>AfterCounter allows only to get the current value of calls to the mocked method, which is useless in table tests and lead to potential logical errors to pass the test.

There is a convenient method Times(N) in gomock. Could you add a similar one?

@CyganFx CyganFx changed the title Proposal: allow expected counter for concrete controller's method Allow expected counter for concrete controller's method Nov 30, 2022
@zcolleen
Copy link
Collaborator

@CyganFx hi, thanks for issue. In this case we could use <method>AfterCounter but i agree that it is not very convenient way when you write table test and want to chain expectations. Feature could be added in pr above

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

No branches or pull requests

2 participants