January 2018
Intermediate to advanced
414 pages
10h 29m
English
In Spring microservices, we create beans that will be used by other components within the application, and as they need to be tested, we can create a JUnit test that uses them. In our example, we have created an interface named CustomerService that has been implemented by the CustomerServiceImpl class, which is annotated with the @Service annotation; this has created a bean in our context that we can test.
First, let's open our CustomerServiceImpl class and select class. We can select the class name and press Shift + Ctrl + T. A new window will appear with the title Choose Test for CustomerServiceImpl with an option to Create New Test. Selecting that option will bring up the Create Test window:
By default, ...
Read now
Unlock full access