Beispiel #1
0
        public void Age_IsCorrect(string birthDateString, string currentDateString, int expectedAge)
        {
            DateTime birthDate   = DateTime.Parse(birthDateString);
            DateTime currentDate = DateTime.Parse(currentDateString);
            int      age         = AgeCalculator.GetAgeFromBirthday(birthDate, currentDate);

            Assert.AreEqual(age, expectedAge);
        }
Beispiel #2
0
 private int GetAgeFromBirthday()
 {
     return(AgeCalculator.GetAgeFromBirthday(this.Birthday));
 }