I would like to ask how is it with Dependency Injection in Angular4 and how it can be used for mocking services in Unit Tests.
First at all, I didn't check on any Angular2 testing framework, at this point, I'd like to know more about the general concept.
Why is DI in Angular being called DI at all?
When you list a service in a constructor to be injected, you have to import the reference to the file.
When you register a service in the providers, it's just a class name. I don't see here any possibility of Interface - Class pairing.
I cannot resist, but I see no difference from this behavior to static classes.
What would be the technic to somehow mock the service for unit tests?
Many thanks for all inputs :)