Answer the question
In order to leave comments, you need to log in
Which is easier to test when the Inject is in a method or in a constructor?
What and when to apply?
Let's say there is a controller, some methods have their own injection, at the same time the class has its own injections + the class that it inherits has injections. It turns out that there are 3 points where DI goes. So the question arose of how to break it all down to make it easier to test, to do only injections in each method, or everything in an abstract class, but that's what is only in this controller.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question