public void GetNumberOfPeriodsInYear_360DayYearPolicy_Returns360() { var date = new DateTime(2013, 6, 7); var policy = new DailyPeriodPolicy(); var yearPolicy = new ThreeHundredSixtyDayYearPolicy(); Assert.That(policy.GetNumberOfPeriodsInYear(date, yearPolicy), Is.EqualTo(360)); }
public void GetNumberOfPeriodsInYear_ActualDayYearPolicy_ReturnsActualNumberOfDays() { var date = new DateTime(2013, 6, 7); var policy = new DailyPeriodPolicy(); var yearPolicy = new ActualNumberOfDayYearPolicy(); Assert.That(policy.GetNumberOfPeriodsInYear(date, yearPolicy), Is.EqualTo(365)); date = new DateTime(2012, 6, 7); Assert.That(policy.GetNumberOfPeriodsInYear(date, yearPolicy), Is.EqualTo(366)); }
public void GetNumberOfDays_ReturnsOne() { var date = DateTime.Today; var policy = new DailyPeriodPolicy(); Assert.That(policy.GetNumberOfDays(date), Is.EqualTo(1)); }
public void GetPreviousDate_ReturnsPreviousDay() { var date = new DateTime(2013, 6, 7); var policy = new DailyPeriodPolicy(); Assert.That(policy.GetPreviousDate(date), Is.EqualTo(new DateTime(2013, 6, 6))); }