Ejemplo n.º 1
0
        public void should_ask_values()
        {
            using (var @in = new StringReader("100\r\n200"))
            {
                Console.SetIn(@in);
                var(weight, height) = BMI.Ask();

                weight.Should().Be(100);
                height.Should().Be(200);
            }
        }
        public void should_calculate_bmi()
        {
            var result = BMI.Calculate(weight: 185M, height: 1.72M);

            result.Should().Be(62.533802055164954029204975663M);
        }
        public void should_evaluate_bmi(decimal weight, decimal height, string expected)
        {
            var result = BMI.Evaluate(BMI.Calculate)(weight, height);

            result.Should().Be(expected);
        }