mock<T> static method
pass mocked instance to instance
. And <T>
the original type
Implementation
@visibleForTesting
static void mock<T>(T instance) {
_mocks.putIfAbsent(T, () => instance);
}
pass mocked instance to instance
. And <T>
the original type
@visibleForTesting
static void mock<T>(T instance) {
_mocks.putIfAbsent(T, () => instance);
}