public void Test_to_kelvin_from_celsius_with_invalid_parameter_throws_exception() { // Arrange. var inputCelsius = new CelsiusInt(int.MaxValue); // Act. var result = Assert.Throws <ArgumentOutOfRangeException>(() => inputCelsius.ToKelvin()); // Assert. result.Message.Should().Contain("Value out of range for type."); }
public void Test_to_kelvin_from_celsius_returns_correct_value() { // Arrange. const int expected = 473; var input = new CelsiusInt(200); // Act. var result = input.ToKelvin(); // Assert. result.Should().Be(expected); }