Esempio n. 1
0
        public WeatherData ConvertBbcToStandardResult(BbcWeatherResult bbcResult)
        {
            if (bbcResult == null)
            {
                return(new WeatherData());
            }

            return(new WeatherData
            {
                TemperatureC = bbcResult.TemperatureCelsius,
                TemperatureF = ConvertTemperatures.ConvertCelsiusToFahrenheit(bbcResult.TemperatureCelsius),
                Location = bbcResult.Location,
                WindSpeedKph = bbcResult.WindSpeedKph,
                WindSpeedMph = ConvertDistances.ConvertKilometersToMiles(bbcResult.WindSpeedKph)
            });
        }
Esempio n. 2
0
 public void Given100CConvertTemperatureShouldReturn212F()
 {
     // Data from Googles converter app
     Assert.Equal(212, ConvertTemperatures.ConvertCelsiusToFahrenheit(100));
 }