public async Task <IHttpActionResult> GetAll() { try { IEnumerable <City> cities = await _cityOperations.GetAllAsync(); var result = Mapper.Map <IEnumerable <CityViewModelGet> >(cities); return(Ok(result)); } catch (Exception ex) { ErrorLogger.Log("CANNOT GETALL CITIES", ex); throw; } }
public void GetAll_Ok_Test() { var result = _cityOperations.GetAllAsync().Result; Assert.IsTrue(result.Any()); }