public async Task TestMethod1() { string xmlResponse = await WeatherConnection.LoadWeatherAsync("Wroclaw"); Weather result; using (MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(xmlResponse))) { result = ParseWeatherXML.Parse(stream); } Assert.AreEqual("Wroclaw", result.City); }
public async Task ParseTestAsync() { string responseXML = await WeatherConnection.LoadDataAsync("London"); WeatherDataEntry result; using (MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(responseXML))) { result = ParseWeather_XmlReader.Parse(stream); } Assert.IsNotNull(result.City); }
public async Task LoadForecastAsyncTestAsync() { string responseXML = await WeatherConnection.LoadForecastAsync("London"); Assert.IsNotNull(responseXML); }