public async Task DeleteLotAsync_DeleteExistingLot_LotDeleted() { var id = 1; _mockUnitWork.Setup(x => x.Lots.GetAsync(id)).ReturnsAsync(_lots.Find(x => x.LotId == id)); _mockUnitWork.Setup(x => x.Lots.Delete(id)); await _service.DeleteLotAsync(id); _mockUnitWork.Verify(x => x.Lots.Delete(id), Times.Once); }
public async Task <IHttpActionResult> DeleteLotAsync(int id) { await _lotsService.DeleteLotAsync(id); return(ResponseMessage(new HttpResponseMessage(HttpStatusCode.NoContent))); }