public async Task <IActionResult> Delete(int id) { try { await _studiosService.Delete(id); return(Ok()); } catch (ArgumentException ex) { return(BadRequest(ex.Message)); } }
public void DeleteCastTest() { CreateStudioDto myDeleteExceptionCast = new CreateStudioDto(); Task.WaitAll(Assert.ThrowsExceptionAsync <ArgumentOutOfRangeException>(() => _StudiosService.Delete(-1), "Id cannot be lower than 1.")); }