@Test(expected = BasketNotFoundException.class) public void deleteBasket() { BasketModel basketModel = getMockedBasketModel("dummy"); BasketModel result = basketController.newBasket(basketModel); basketController.deleteBasket(result.getId()); basketController.one(result.getId()); }
@DeleteMapping("/baskets/{id}") void deleteBasket(@PathVariable UUID id) { BasketModel basketModel = one(id); basketRepository.delete(basketModel); }
BasketController { @DeleteMapping("/baskets/{id}") void deleteBasket(@PathVariable UUID id) { BasketModel basketModel = one(id); basketRepository.delete(basketModel); } }
BasketController { @DeleteMapping("/baskets/{id}") void deleteBasket(@PathVariable UUID id) { BasketModel basketModel = one(id); basketRepository.delete(basketModel); } @Autowired  BasketController(BasketRepository basketRepository); }
BasketController { @DeleteMapping("/baskets/{id}") void deleteBasket(@PathVariable UUID id) { BasketModel basketModel = one(id); basketRepository.delete(basketModel); } @Autowired  BasketController(BasketRepository basketRepository);  }
BasketController { @DeleteMapping("/baskets/{id}") void deleteBasket(@PathVariable UUID id) { BasketModel basketModel = one(id); basketRepository.delete(basketModel); } @Autowired  BasketController(BasketRepository basketRepository);   }