Typed expected mocks #788
mesirendon
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
This is a known "problem". The issue is that we may need to specify If anyone would be willing to implement strictly typed arguments, I will 100% approve it. But given how this introduces confusion on how to specify |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, here's the thing
If I write an interface with a given method, the generated mock includes the expecter. It's useful to check on the number of parameters the mock is supposed to receive. However, the parameters are interface-typed. And at, the same time, the return knows perfectly well what the type of the results are.
I don't know how to force the expecter to have specific types of parameters instead of interfaces. If not, I think it would be nice to have mock parameters typed as stated in the original interfaces.
An example here to give context.
If I define the following interface
It generates the following mock related expecter:
Beta Was this translation helpful? Give feedback.
All reactions