public void ReturnCorrectValue_WhenInputCorrect(double temperature, string expected) { //Arrange var weather = new StubIWeather() { GetTemperature = () => { return(temperature); } }; //Act var results = SUT.WeatherUtilities.JudgeWeatherByEarthHistory(weather); //Assert expected.Should().Be(results); }
public void ReturnThrowException_WhenLessThan273(double temperature) { //Arrange var weather = new StubIWeather() { GetTemperature = () => { return(temperature); } }; string results = string.Empty; Action act = () => results = SUT.WeatherUtilities.JudgeWeatherByEarthHistory(weather); //Act //Assert act.Should().Throw <ColderThanAbsoluteZeroException>(); }