The approach is not specific to our project so please refer the available general documentation and tutorials about testing of Spring Boot applications.
The following resources may be helpful:
Spring Boot Testingarrow-up-right
Mockitoarrow-up-right
Unit tests for a class should usually cover that "unit" of code, i.e. your implementation of that class but not of all the referenced other services.
Try to "mock" all services that your implementation depends on.
Last updated 1 year ago