@Test public void deleteUser() { given() .when().delete("/api/users/"+ user.getId()) .then() .statusCode(200); }
@DELETE @Path("/users/{id}") @Timed public Response delete(@PathParam("id") String id) { LOGGER.info("REST request to delete User : {}", id); userService.delete(id); return Response.ok().build(); }
UserResource { @DELETE @Path("/users/{id}") @Timed public Response delete(@PathParam("id") String id) { LOGGER.info("REST request to delete User : {}", id); userService.delete(id); return Response.ok().build(); } }
UserResource { @DELETE @Path("/users/{id}") @Timed public Response delete(@PathParam("id") String id) { LOGGER.info("REST request to delete User : {}", id); userService.delete(id); return Response.ok().build(); } @Inject  UserResource(UserService userService); }
UserResource { @DELETE @Path("/users/{id}") @Timed public Response delete(@PathParam("id") String id) { LOGGER.info("REST request to delete User : {}", id); userService.delete(id); return Response.ok().build(); } @Inject  UserResource(UserService userService); @GET @Path("/users") @Timed Response findAll(@BeanParam PageableImpl pageable); @GET @Path("/users/me") @Timed Response findMyData(); @GET @Path("/users/{id}") @Timed Response findById(@PathParam("id") String id); @GET @Path("/users/username/{username}") @Timed Response findByUsername(@PathParam("username") String username); @POST @Path("/users") @Timed Response create(UserDTO userDTO); @PUT @Path("/users") @Timed Response update(UserDTO userDTO); @DELETE @Path("/users/{id}") @Timed Response delete(@PathParam("id") String id); }
UserResource { @DELETE @Path("/users/{id}") @Timed public Response delete(@PathParam("id") String id) { LOGGER.info("REST request to delete User : {}", id); userService.delete(id); return Response.ok().build(); } @Inject  UserResource(UserService userService); @GET @Path("/users") @Timed Response findAll(@BeanParam PageableImpl pageable); @GET @Path("/users/me") @Timed Response findMyData(); @GET @Path("/users/{id}") @Timed Response findById(@PathParam("id") String id); @GET @Path("/users/username/{username}") @Timed Response findByUsername(@PathParam("username") String username); @POST @Path("/users") @Timed Response create(UserDTO userDTO); @PUT @Path("/users") @Timed Response update(UserDTO userDTO); @DELETE @Path("/users/{id}") @Timed Response delete(@PathParam("id") String id);  }