You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a situation in which a mock needs to be called over 1,000,000 times, with parameters. Because call capturing is automatic, Moq captures each call and its data and stores it in memory.
In this situation, I have no need for the verification of mock methods being called. Can you implement a constructor parameter or MockRepository option that can explicitly enable or disable mock verification, subsequently avoiding capturing calls and storing their data in memory?
The text was updated successfully, but these errors were encountered:
Until (if) such an opt-out is implemented, have you tried (as a workaround only, of course) resetting the mock using mock.ResetCalls() e.g. after every few thousand calls?
Now that we have Mock.Switches and MockRepository.Switches (feature / compatibility switches), this probably wouldn't be too difficult to implement.
@thefellow3j, @janslav - since this issue has been at sleep for a while... is automatic call capture by default still a problem for you, or can we close this?
I have a situation in which a mock needs to be called over 1,000,000 times, with parameters. Because call capturing is automatic, Moq captures each call and its data and stores it in memory.
In this situation, I have no need for the verification of mock methods being called. Can you implement a constructor parameter or MockRepository option that can explicitly enable or disable mock verification, subsequently avoiding capturing calls and storing their data in memory?
The text was updated successfully, but these errors were encountered: