Answer the question
In order to leave comments, you need to log in
Are these unit tests or integration tests?
Hello. I want to write tests for a validator that takes part of the data for validation from a third-party service, the object of which is received in the constructor.
If you lock the service, do the tests still remain integration tests or are they already Unit tests?
Answer the question
In order to leave comments, you need to log in
Integration tests check the integration between different components of the system, for example, between 2 services or a service and a database.
In your example, you are mocking the second service, so the integration is not checked. So this is no longer an integration, but a unit test
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question