Esempio n. 1
0
        public WeatherData ConvertAccToStandardResult(AccWeatherResult accuResult)
        {
            if (accuResult == null)
            {
                return(new WeatherData());
            }

            return(new WeatherData
            {
                TemperatureC = ConvertTemperatures.ConvertFahrenheitToCelsius(accuResult.TemperatureFahrenheit),
                TemperatureF = accuResult.TemperatureFahrenheit,
                Location = accuResult.Where,
                WindSpeedKph = ConvertDistances.ConvertMilesToKilometers(accuResult.WindSpeedMph),
                WindSpeedMph = accuResult.WindSpeedMph
            });
        }
Esempio n. 2
0
 public void Given100FConvertTemperatureShouldReturn37c()
 {
     // Data from Googles converter app
     Assert.InRange <double>(ConvertTemperatures.ConvertFahrenheitToCelsius(100), 37.77, 37.78);
 }