示例#1
0
        public void GetBMi_SimpleValues_ShouldReturnBMIString()
        {
            var controller = new AnthroController();

            double expected = 16.9;
            double weight   = 9.00;
            double height   = 73.00;
            double actual   = controller.GetBMI(weight, height);

            Assert.Equal(expected, actual);
        }
示例#2
0
        public void GetAge_SimpleValues_ShouldReturnYearMonthString()
        {
            var controller = new AnthroController();

            String   expected = "3yr 0mo (36mo)";
            DateTime visit    = new DateTime(2019, 12, 1);
            DateTime birth    = new DateTime(2016, 12, 1);
            String   actual   = controller.GetAge(birth, visit);

            Assert.Equal(expected, actual);
        }
示例#3
0
        public void GetAgeInDays_SimpleValues_ShouldReturnDaysString()
        {
            var controller = new AnthroController();

            String   expected = "1095";
            DateTime visit    = new DateTime(2019, 12, 1);
            DateTime birth    = new DateTime(2016, 12, 1);
            String   actual   = controller.GetAgeInDays(birth, visit);

            Assert.Equal(expected, actual);
        }
        public void Age_Months_ShouldReturnMonthsString()
        {
            var controller = new AnthroController();

            String   expected = "36";
            DateTime visit    = new DateTime(2019, 12, 1);
            DateTime birth    = new DateTime(2016, 12, 1);
            String   actual   = controller.GetAgeInMonths(birth, visit);

            Assert.Equal(expected, actual);
        }