public void SetWindSpeed_MetersPerSecond_ProperlySetsValue() { var builder = new WeatherDataBuilder(); var data = builder.SetWindSpeed(10, WindSpeedUnit.MetersPerSecond).Build(); Assert.Equal(36, data.WindSpeed); }
public void SetWindSpeed_MilesPerHour_ProperlySetsValue() { var builder = new WeatherDataBuilder(); var data = builder.SetWindSpeed(10, WindSpeedUnit.MilesPerHour).Build(); Assert.Equal(16.09f, data.WindSpeed); }
public void SetWindSpeed_KilometersPerHour_ProperlySetsValue() { var builder = new WeatherDataBuilder(); var windSpeed = 10; builder.SetWindSpeed(windSpeed, WindSpeedUnit.KilometersPerHour); var data = builder.Build(); Assert.Equal(windSpeed, data.WindSpeed); }
public void SetWindSpeed_InvalidValue_ThrowsException(float value) { var builder = new WeatherDataBuilder(); Assert.ThrowsAny <InvalidOperationException>(() => builder.SetWindSpeed(value, WindSpeedUnit.KilometersPerHour)); }