private async Task SetIatasToAsync() { var iataService = new IataService(_httpService, _jsonConverter); _dataOfFlights.CityTo = SelectedCityTo; var iatasTo = await iataService.GetIataAsync(SelectedCityTo); _dataOfFlights.IatasTo = iatasTo; IsDataAboutFlightExist = (IsDataAboutFlightExistCheck()) ? true : false; }
public void GetIatasAsyncTest() { base.ClearAll(); var mockHttpService = new HttpService(); Ioc.RegisterSingleton <IHttpService>(mockHttpService); var mockJsonConverter = new JsonConverter(); Ioc.RegisterSingleton <IJsonConverter>(mockJsonConverter); var service = new IataService(mockHttpService, mockJsonConverter); NUnit.Framework.Assert.IsNotNull(service.GetIataAsync("Minsk").Result); }