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
Whenever multiple functions with the same signature are mocked within the same mocker, they are treated as one.
In test below, I would expect that function1 and function2 are registered as separate entities, but unfortunately they are both registered with invoke() name.
I can see that mockFunctionX does not really consider return type so () -> Int and () -> List<Int> are registered as the same entity and it leads to ClassCastException (on JVM).
Even if this behavior is intentional, it makes mocking functions less useful.
The text was updated successfully, but these errors were encountered:
Whenever multiple functions with the same signature are mocked within the same mocker, they are treated as one.
In test below, I would expect that
function1
andfunction2
are registered as separate entities, but unfortunately they are both registered withinvoke()
name.I can see that
mockFunctionX
does not really consider return type so() -> Int
and() -> List<Int>
are registered as the same entity and it leads toClassCastException
(on JVM).Even if this behavior is intentional, it makes mocking functions less useful.
The text was updated successfully, but these errors were encountered: