示例#1
0
 public void Should_Return_5_Given_Year_20101112_and_20151201()
 {
     //Given
     var ageCalc = new AgeCalc();
     var birthDate = new DateTime(2010, 11, 12);
     var ageDate = new DateTime(2015, 12, 01);
     //When
     var result = ageCalc.CalculateAge(birthDate, ageDate);
     //Then
     Assert.AreEqual(5, result);
 }
示例#2
0
 public void Should_Return_26_Given_Year_19890809_and_20151112()
 {
     //Given
     var ageCalc = new AgeCalc();
     var birthDate = new DateTime(1989, 08, 09);
     var ageDate = new DateTime(2015, 11, 12);
     //When
     var result = ageCalc.CalculateAge(birthDate, ageDate);
     //Then
     Assert.AreEqual(26, result);
 }