How to use Diffblue Cover in test driven development (TDD)
This tutorial shows how to use Diffblue Cover Plugin for IntelliJ with test driven development (TDD).
/**
* @GetMapping("/owners") public String processFindForm(Owner owner, ...)
* Look up the owner in the database by the given last name.
* If a single owner is found, redirect to /owners/{ownerId}.
* If several owners are found, allow selection of an owner in owners/ownersList.
*/@WebMvcTest(controllers = {OwnerController.class})
@ExtendWith(SpringExtension.class)
public class OwnerControllerTest {
@Autowired
private MockMvc mockMvc;
@MockBean(name = "ownerRepository")
private OwnerRepository ownerRepository;
@MockBean(name = "visitRepository")
private VisitRepository visitRepository;
...
Summary
Last updated
Was this helpful?

