public void CalculateAge_GivenATargetDateSimilarToBirthDate_ShouldReturnZero(DateTime targetDate) { //Arrange var ageResult = new AgeCalculator(); DateTime birthDate = new DateTime(targetDate.Year, 03, 05); //Act var actual = ageResult.CalculatorAge(birthDate, targetDate); //Assert Assert.AreEqual(0, actual); }
public void CalculateAge_GivenABirthDateOfDifferentYearAndDiffirentMonthAsTargetDate_ShouldReturnZero() { //Arrange var ageResult = new AgeCalculator(); DateTime birthDate = new DateTime(2018, 03, 05); DateTime targetDate = new DateTime(2019, 01, 05); //Act var actual = ageResult.CalculatorAge(birthDate, targetDate); //Assert Assert.AreEqual(0, actual); }
public void CalculateAge_GivenABirthDateGreaterThanTargetDate_ShouldReturnZero() { //Arrange var ageResult = new AgeCalculator(); DateTime birthDate = new DateTime(2018, 03, 05); DateTime targetDate = new DateTime(2015, 03, 05); //Act var actual = ageResult.CalculatorAge(birthDate, targetDate); //Assert Assert.AreEqual(0, actual); }