public void MonthlyTestBlock1()
        {
            //arrange
            var currentTime = new StubITimeProvider { TimeGet = () => DateTime.Parse("5/20/14 15:02:20 ") };
            var task = new StubIMonthlyScheduledTask
            {
                StartTimeGet = () => DateTime.Parse("5/20/14 15:02:20"),
                RepeatIntervalInMonthsGet = () => 0
            };

            //act
            var result = task.EvalMonthlyTrigger(currentTime);

            //assert
            Assert.IsFalse(result);
        }
예제 #2
0
        public void MonthlyTestBlock1()
        {
            //arrange
            var currentTime = new StubITimeProvider {
                TimeGet = () => DateTime.Parse("5/20/14 15:02:20 ")
            };
            var task = new StubIMonthlyScheduledTask
            {
                StartTimeGet = () => DateTime.Parse("5/20/14 15:02:20"),
                RepeatIntervalInMonthsGet = () => 0
            };

            //act
            var result = task.EvalMonthlyTrigger(currentTime);

            //assert
            Assert.IsFalse(result);
        }
예제 #3
0
        public void EvaluateMonthlyScheduledTaskTest6()
        {
            //arrange
            var currentTime = new StubITimeProvider {
                TimeGet = () => DateTime.Parse("7/1/14 15:02:20")
            };
            var task = new StubIMonthlyScheduledTask
            {
                StartTimeGet = () => DateTime.Parse("5/20/14 15:02:20"),
                RepeatIntervalInMonthsGet = () => 2,
                DaysOfMonthToActivateGet  = () => DaysOfMonth.All
            };


            //act
            var result = task.EvalMonthlyTrigger(currentTime);

            //assert
            Assert.IsTrue(result);
        }
        public void EvaluateMonthlyScheduledTaskTest6()
        {
            //arrange
            var currentTime = new StubITimeProvider { TimeGet = () => DateTime.Parse("7/1/14 15:02:20") };
            var task = new StubIMonthlyScheduledTask
            {
                StartTimeGet = () => DateTime.Parse("5/20/14 15:02:20"),
                RepeatIntervalInMonthsGet = () => 2,
                DaysOfMonthToActivateGet = () => DaysOfMonth.All
            };
            

            //act
             var result = task.EvalMonthlyTrigger(currentTime);

            //assert
            Assert.IsTrue(result);
        }