Description
Guys we are having an issue when we pass interface into a constructor of a service that depedens on a super type.
In this image as you can see it is not possible to depend on abstraction it required the same concret class annotated with @Service() annotation.
This is coupling and make testing hard, because for integration testing on my API I need to double the repository to avoid direct database calls or any other 3er party API.
Also it is not possible to change the dependency for a mock one during the testing.
How are you handling this issue guys?
Description
Guys we are having an issue when we pass interface into a constructor of a service that depedens on a super type.
In this image as you can see it is not possible to depend on abstraction it required the same concret class annotated with
@Service()annotation.This is coupling and make testing hard, because for integration testing on my API I need to double the repository to avoid direct database calls or any other 3er party API.
Also it is not possible to change the dependency for a mock one during the testing.
How are you handling this issue guys?