Example #1
0
        public void TestSuccessfulConversion(ConversionResult expected)
        {
            var conversion    = new TemperatureConversion();
            var convertResult = conversion.DoConversion("kelvin", "celsius", 100);

            expected.Should().BeEquivalentTo(expected);
        }
Example #2
0
        public void TestIncompatibleConversion(string from, string to, decimal value)
        {
            var conversion = new TemperatureConversion();

            Assert.Throws <IncompatibleConversionException>(() =>
            {
                conversion.DoConversion(from, to, value);
            });
        }