public void ThenIReceiveTheExpectedWeatherReportForCity(string city) { string response = _scenarioContext["response"].ToString(); string timezone = JsonUtils.getFieldFromJson(response, "timezone"); Assert.AreEqual(TestDataUtils.getCityTimezone(city), timezone, true); }
public void WhenIMakeAOneCallRequestToGetTheWeatherForCity(string city) { string apiKey = "appid=" + TestDataUtils.getApiKey(); string latitude = "lat=" + TestDataUtils.getCityLatitude(city); string longitude = "lon=" + TestDataUtils.getCityLongitude(city); var url = TestDataUtils.baseUrl + TestDataUtils.oneCallApi + latitude + "&" + longitude + "&" + apiKey; _scenarioContext["response"] = RequestUtils.GetRequest(url).Result; }