public async void GetAirplane_IdDoesNotExist_ShouldFail() { SetUpMocksAndServices(); var result = await _aircraftService.FindById(notValidId); Assert.False(result.Success); }
public async Task <IActionResult> Get(int id) { var result = await _aircraftService.FindById(id); if (!result.Success) { return(BadRequest(result.Message)); } var aircraftDTO = _mapper.Map <T, TResponse>(result.Aircraft); return(Ok(aircraftDTO)); }