示例#1
0
        public async Task CityServiceTest()
        {
            WeatherServiceRef.GlobalWeatherSoap obj = new WeatherServiceRef.GlobalWeatherSoapClient();
            var cities = await obj.GetCitiesByCountryAsync("Australia");

            Assert.IsNotNull(cities);
            Assert.IsTrue(cities.IndexOf("Sydney") >= 0);
        }
示例#2
0
        public async Task <string> GetCitiesAsync(string country)
        {
            WeatherServiceRef.GlobalWeatherSoap obj = new WeatherServiceRef.GlobalWeatherSoapClient();
            var cities = await obj.GetCitiesByCountryAsync(country);

            var json = JsonHelper.processWeatherResult(cities);

            return(json);
        }