示例#1
0
        public void is_valid_test()
        {
            var cron_schedule = new CronSchedule();

            Assert.IsTrue(cron_schedule.isValid("*/2"));
            Assert.IsTrue(cron_schedule.isValid("* * * * *"));
            Assert.IsTrue(cron_schedule.isValid("0 * * * *"));
            Assert.IsTrue(cron_schedule.isValid("0,1,2 * * * *"));
            Assert.IsTrue(cron_schedule.isValid("*/2 * * * *"));
            Assert.IsTrue(cron_schedule.isValid("1-4 * * * *"));
            Assert.IsTrue(cron_schedule.isValid("1-55/3 * * * *"));
            Assert.IsTrue(cron_schedule.isValid("1,10,20 * * * *"));
            Assert.IsTrue(cron_schedule.isValid("* 1,10,20 * * *"));
        }