Exemple #1
0
        public void MissingCronExpressionShouldApplyDefaultCronExpression()
        {
            ScheduledJobSetting scheduledJobSetting = new ScheduledJobSetting();
            var configurator = new DeleteExpiredTokensSchedulerConfigurator();

            var expectedResult = SchedulerConfiguratorBase <DeleteExpiredTokensScheduledJob> .DefaultCronExpression;
            var actualResult   = configurator.GetCronExpression(scheduledJobSetting);

            Assert.AreEqual(expectedResult, actualResult);
        }
Exemple #2
0
        public void ValidCronExpressionShouldApplyProvidedCronExpression()
        {
            string validCronSchedule = "0 0/20 * 1/1 * ? *";
            ScheduledJobSetting scheduledJobSetting = new ScheduledJobSetting()
            {
                CronExpression = validCronSchedule
            };

            var configurator = new DeleteExpiredTokensSchedulerConfigurator();

            var expectedResult = validCronSchedule;
            var actualResult   = configurator.GetCronExpression(scheduledJobSetting);

            Assert.AreEqual(expectedResult, actualResult);
        }