/// <summary> /// Gets the current weather conditions for the given zip code /// </summary> /// <param name="zipCode"></param> /// <returns></returns> public CurrentConditions GetCurrentConditions(string zipCode) { ZipCodeInfo zipCodeObject = this.zipCodeService.GetZipCode(zipCode); NoaaWeatherClient noaaClient = new NoaaWeatherClient(); NoaaResponse response = noaaClient.GetWeatherConditions(zipCodeObject.Latitude.Value, zipCodeObject.Longitude.Value); return(this.MapResponseObject(response)); }
public void TestGetCurrentConditionsFromNoaa() { // Arrange double latitude = 44.261917; double longitude = -88.414525; // Act NoaaWeatherClient client = new NoaaWeatherClient(); NoaaResponse response = client.GetWeatherConditions(latitude, longitude); // Assert Assert.NotNull(response); }