@Test public void testDelete() throws Exception { ResultActions resultActions = mvc.perform(MockMvcRequestBuilders.delete("/users/1")); resultActions.andExpect(MockMvcResultMatchers.status().isOk()); resultActions.andExpect(MockMvcResultMatchers.content().string("false")); }
@DeleteMapping("/{id}") public Boolean delete(@PathVariable("id") Integer id) { Boolean success = false; return success; }
UserController { @DeleteMapping("/{id}") public Boolean delete(@PathVariable("id") Integer id) { Boolean success = false; return success; } }
UserController { @DeleteMapping("/{id}") public Boolean delete(@PathVariable("id") Integer id) { Boolean success = false; return success; }  }
UserController { @DeleteMapping("/{id}") public Boolean delete(@PathVariable("id") Integer id) { Boolean success = false; return success; }  @GetMapping("") List<UserVO> list(); @GetMapping("/{id}") UserVO get(@PathVariable("id") Integer id); @GetMapping("/v2/{id}") UserVO get2(@PathVariable("id") Integer id); @PostMapping("") Integer add(UserAddDTO addDTO); @PutMapping("/{id}") Boolean update(@PathVariable("id") Integer id, UserUpdateDTO updateDTO); @DeleteMapping("/{id}") Boolean delete(@PathVariable("id") Integer id); }
UserController { @DeleteMapping("/{id}") public Boolean delete(@PathVariable("id") Integer id) { Boolean success = false; return success; }  @GetMapping("") List<UserVO> list(); @GetMapping("/{id}") UserVO get(@PathVariable("id") Integer id); @GetMapping("/v2/{id}") UserVO get2(@PathVariable("id") Integer id); @PostMapping("") Integer add(UserAddDTO addDTO); @PutMapping("/{id}") Boolean update(@PathVariable("id") Integer id, UserUpdateDTO updateDTO); @DeleteMapping("/{id}") Boolean delete(@PathVariable("id") Integer id);  }