-
Notifications
You must be signed in to change notification settings - Fork 448
Description
I went looking for an existing issue for this but couldn't find one.
I would like to have my generated mock include more type-safe assertions. For example if my struct has the following method:
func (obj* MyObj) MyFunc(a int, b int) boolI currently do the following:
testObj.On("MyFunc", 1, 2).Return(false)But I would like to do:
testObj.OnMyFunc(1, 2).Return(false)where OnMyFunc is itself typed to take two arguments exactly, and the object returned has a Return method which requires a bool argument.
This would make it harder to make errors when writing tests, and would alert me to more issues at compile time after I've regenerated my mocks.
The context here is that I'm about to start using this package quite heavily but am wary of how the lack of type safety will make refactoring harder in the future.
Let me know if there's anything I could do to help with this. Thanks :)