public void IsTemperatureValid_WithValidAndInvalidValues_ReturnsExpectedResults(double temperature, bool expected) { TemperatureLogic temperatureLogic = new TemperatureLogic(); bool actual = temperatureLogic.IsTemperatureValid(temperature); Assert.AreEqual(expected, actual); }
public void Update() { IEnumerable <City> cities = store.GetCities(); foreach (City aCity in cities) { // Format and if within valid range, save double temperature = logic.FormatTemperature(provider.GetTemperature(aCity.Name, aCity.Country)); if (logic.IsTemperatureValid(temperature)) { store.UpdateCityTemperature(aCity, temperature); } } }