@Test public void deleteAuthor() throws Exception { authorRepository.save(author); restAuthorMockMvc.perform(delete("/app/rest/authors/{id}", author.getId()) .accept(TestUtil.APPLICATION_JSON_UTF8)) .andExpect(status().isOk()); List<Author> authors = authorRepository.findAll(); assertThat(authors).hasSize(0); }
@RequestMapping(value = "/rest/authors/{id}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public void delete(@PathVariable String id) { log.debug("REST request to delete Author : {}", id); authorRepository.delete(id); }
AuthorResource { @RequestMapping(value = "/rest/authors/{id}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public void delete(@PathVariable String id) { log.debug("REST request to delete Author : {}", id); authorRepository.delete(id); } }
AuthorResource { @RequestMapping(value = "/rest/authors/{id}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public void delete(@PathVariable String id) { log.debug("REST request to delete Author : {}", id); authorRepository.delete(id); }  }
AuthorResource { @RequestMapping(value = "/rest/authors/{id}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public void delete(@PathVariable String id) { log.debug("REST request to delete Author : {}", id); authorRepository.delete(id); }  @RequestMapping(value = "/rest/authors", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) @Timed void create(@RequestBody Author author); @RequestMapping(value = "/rest/authors", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @Timed List<Author> getAll(); @RequestMapping(value = "/rest/authors/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @Timed ResponseEntity<Author> get(@PathVariable String id); @RequestMapping(value = "/rest/authors/{id}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE) @Timed void delete(@PathVariable String id); }
AuthorResource { @RequestMapping(value = "/rest/authors/{id}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public void delete(@PathVariable String id) { log.debug("REST request to delete Author : {}", id); authorRepository.delete(id); }  @RequestMapping(value = "/rest/authors", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) @Timed void create(@RequestBody Author author); @RequestMapping(value = "/rest/authors", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @Timed List<Author> getAll(); @RequestMapping(value = "/rest/authors/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @Timed ResponseEntity<Author> get(@PathVariable String id); @RequestMapping(value = "/rest/authors/{id}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE) @Timed void delete(@PathVariable String id);  }