public void WeeklyTestBlock1() { //arrange var currentTime = new StubITimeProvider { TimeGet = () => DateTime.Parse("5/20/14 15:02:20 ") }; var task = new StubIWeeklyScheduledTask { StartTimeGet = () => DateTime.Parse("5/20/14 15:02:20"), RepeatIntervalInWeeksGet = () => 0 }; //act var result = task.EvalWeeklyTrigger(currentTime); //assert Assert.IsFalse(result); }
public void EvaluateWeekingScheduledTaskTest9() { //arrange var currentTime = new StubITimeProvider { TimeGet = () => DateTime.Parse("5/31/14 15:02:20") }; var task = new StubIWeeklyScheduledTask { StartTimeGet = () => DateTime.Parse("5/20/14 15:02:20"), RepeatIntervalInWeeksGet = () => 1, DaysOfWeekToActivateGet = () => DaysOfWeek.All }; //act var result = task.EvalWeeklyTrigger(currentTime); //assert Assert.IsTrue(result); }