February 2019
Intermediate to advanced
446 pages
10h 55m
English
To enable testing, the following dependency in the pom.xml file is used:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
To test the RestaurantController, the following files have been added:
@RunWith(SpringRunner.class)@SpringBootTest(classes = RestaurantApp.class, webEnvironment = WebEnvironment.RANDOM_PORT, properties = { "management.server.port=0", "management.context-path=/admin"})public class RestaurantControllerIntegrationTests ...
Read now
Unlock full access