To allow for stubbing in unit tests, repositories and services are now imported/exported as a singleton object, rather than a class that is instantiated whenever it is used.
It was a choice between introducing Dependency Injection with Inversion of Control and this. Ultimately we should migrate to use DI with IOC, but for now this is good enough as our repositories and services are stateless.
To allow for stubbing in unit tests, repositories and services are now imported/exported as a singleton object, rather than a class that is instantiated whenever it is used.
It was a choice between introducing Dependency Injection with Inversion of Control and this. Ultimately we should migrate to use DI with IOC, but for now this is good enough as our repositories and services are stateless.
closes #4