Пример #1
0
        public void When_1YearOld_Expect_1()
        {
            DateTime dob    = DateTime.Now.AddYears(-1).AddDays(-1);
            int      result = age.Calculate(dob);

            Assert.Equal(1, result);
        }
Пример #2
0
        public async Task <Age> GetAgeObjectAsync(DateTime birth, DateTime visit)
        {
            Age age = new Age(birth, visit);

            _ = await age.Calculate(birth, visit);

            return(age);
        }