public void GetTomorrowWeekHoliday() { var dateReference = new DateTime(2014, 12, 31); var managementHelper = UtilsHelper.CreateDateManagementHelper(); Assert.AreEqual(Convert.ToDateTime("2015-01-02"), managementHelper.GetTomorrow(Convert.ToDateTime("2014-12-31"))); }
public void GetTomorrowWeekend() { var dateReference = new DateTime(2015, 08, 11); var managementHelper = UtilsHelper.CreateDateManagementHelper(); Assert.AreEqual(Convert.ToDateTime("2015-08-17"), managementHelper.GetTomorrow(Convert.ToDateTime("2015-08-14"))); }
public void GetTomorrowWeekendThenHoliday() { var dateReference = new DateTime(2015, 04, 03); var managementHelper = UtilsHelper.CreateDateManagementHelper(); Assert.AreEqual(Convert.ToDateTime("2015-04-07"), managementHelper.GetTomorrow(Convert.ToDateTime("2015-04-03"))); }
public void GetSpanDays1YearSunday() { var dateReference = new DateTime(2014, 11, 22); var managementHelper = UtilsHelper.CreateDateManagementHelper(); Assert.AreEqual(366.00, managementHelper.GetSpanDays(dateReference, dateReference.AddYears(1) - dateReference)); }
public void GetTomorrowTomorrowHolidayPuisWeekend() { var dateReference = new DateTime(2015, 04, 30); var managementHelper = UtilsHelper.CreateDateManagementHelper(); Assert.AreEqual(Convert.ToDateTime("2015-05-04"), managementHelper.GetTomorrow(Convert.ToDateTime("2015-04-30"))); }
public void GetLastNoHoliday() { var dateReference = new DateTime(2015, 01, 13); var managementHelper = UtilsHelper.CreateDateManagementHelper(); Assert.AreEqual(Convert.ToDateTime("2015-01-13"), managementHelper.GetLast(dateReference)); }
public void GetLast2Holidays2() { var dateReference = new DateTime(2016, 01, 04); var managementHelper = UtilsHelper.CreateDateManagementHelper(); Assert.AreEqual(Convert.ToDateTime("2016-01-04"), managementHelper.GetLast(dateReference)); }
public void GetSpanStartWeekEnd() { var dureeStock = new TimeSpan(-7, 0, 0, 0); var dateReference = new DateTime(2015, 01, 12); var managementHelper = UtilsHelper.CreateDateManagementHelper(); Assert.AreEqual(Convert.ToDateTime("2015-01-05"), managementHelper.GetSpanStart(dateReference, dureeStock)); }
public void GetSpanStart3Holiday() { var dureeStock = new TimeSpan(-7, 0, 0, 0); var dateReference = new DateTime(2015, 01, 02); var managementHelper = UtilsHelper.CreateDateManagementHelper(); Assert.AreEqual(Convert.ToDateTime("2014-12-26"), managementHelper.GetSpanStart(dateReference, dureeStock)); }
public void GetSpanEndWeekEnd() { var dureeStock = new TimeSpan(7, 0, 0, 0); var dateReference = new DateTime(2016, 04, 08); var managementHelper = UtilsHelper.CreateDateManagementHelper(); Assert.AreEqual(Convert.ToDateTime("2016-04-15"), managementHelper.GetSpanEnd(dateReference, dureeStock)); }
public void GetSpanEndNoHoliday() { var dureeStock = new TimeSpan(7, 0, 0, 0); var dateReference = new DateTime(2015, 01, 13); var managementHelper = UtilsHelper.CreateDateManagementHelper(); Assert.AreEqual(Convert.ToDateTime("2015-01-20"), managementHelper.GetSpanEnd(dateReference, dureeStock)); }
public void GetSpanEnd2Holidays1() { var dureeStock = new TimeSpan(7, 0, 0, 0); var dateReference = new DateTime(2016, 03, 24); var managementHelper = UtilsHelper.CreateDateManagementHelper(); Assert.AreEqual(Convert.ToDateTime("2016-03-31"), managementHelper.GetSpanEnd(dateReference, dureeStock)); }