If the code under test uses packages x and y, and we enable mocking for x then y will still use the unmocked version of x. This then means that we can't pass values of types from x to y, as y's x is actually a completely different thing.
If we mock a package used by the code under test, then we need to make sure that all packages in the dependency chain use the mocked version of the package if we want to be able to freely pass values around between packages.
We may have to say that this will only be able to work if both x and y are mocked. Otherwise we may actually unravel everything pulling on this thread ... :(
If the code under test uses packages x and y, and we enable mocking for x then y will still use the unmocked version of x. This then means that we can't pass values of types from x to y, as y's x is actually a completely different thing.
If we mock a package used by the code under test, then we need to make sure that all packages in the dependency chain use the mocked version of the package if we want to be able to freely pass values around between packages.
We may have to say that this will only be able to work if both x and y are mocked. Otherwise we may actually unravel everything pulling on this thread ... :(