public async Task <IActionResult> GetById(int id) { var item = await _stuffService.GetByIdAsync(id); if (item == null) { return(NotFound()); } return(new ObjectResult(item)); }
public async Task ThrowsInvalidStuffId() { //var result = await _service.GetByIdAsync(1); await Assert.ThrowsAsync <System.ArgumentNullException>(async() => await _service.GetByIdAsync(-1)); }