Test The Controller With @WebMvcTest
Let’s learn to test the controller layer by using Spring Framework's @WebMvcTest annotation.
We'll cover the following...
We can use the @WebMvcTest
annotation to test the controller layer, in a similar way to how we used @DataJpaTest
for JPA tests.
The TodoControllerTest
class
Let’s create the TodoControllerTest
class in the ...