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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
        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);
        }