Description
The Location class in 5.0.0 is replaced by functions. Functions cannot be easily mocked. Also, should functions be passed around as dependencies? Direct calls to these functions i.e. in notifiers or blocs make it hard to run unit tests in isolation for these classes.
This depends on an app's architecture, but assuming a project is using some kind of DI/service location with injection into constructors then an instance of a class can be mocked for testing purposes with mockito or mocktail.
In order to migrate to the 5.0.0 version, projects will have to introduce their own Location class that will be wrapping the functions this package is providing. Is that intended?
Description The
Location
class in 5.0.0 is replaced by functions. Functions cannot be easily mocked. Also, should functions be passed around as dependencies? Direct calls to these functions i.e. in notifiers or blocs make it hard to run unit tests in isolation for these classes.This depends on an app's architecture, but assuming a project is using some kind of DI/service location with injection into constructors then an instance of a class can be mocked for testing purposes with mockito or mocktail.
In order to migrate to the 5.0.0 version, projects will have to introduce their own
Location
class that will be wrapping the functions this package is providing. Is that intended?