Open dnwe opened 1 year ago
I like this proposal. For me it is the same. In most test cases I only use the func callers. Sometimes I check for the number of calls for a particular method (len of calls). I can not remember a case, where I actually inspected the actual calls struct it self.
In regards to backwards compatibility / non breaking changes, I feel the flag would need to be "opt-out", e.g. something like --omit-calls
.
I think this could be better as a runtime config option similar to adding hooks? We have some cases where we want/don't want counting for the same mock in different contexts.
Currently moq will always generate the call tracking and inspection functionality as part of its template. Personally I prefer to have moq just generate the func callers. Is this a usecase that you'd like to support with a PR to add a cmdline flag opt-out/opt-in, or would you prefer not to have the complexity?
Something along the lines of this: