public void TestMultipleConfigurationsOfHours() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.HourRange(20, 30); bldr.HourIncrements(0, 20); }
public void TestMultipleConfigurationsOfYears() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.YearRange(2011, 2017); bldr.YearIncrements(2017, 3); }
public void TestMultipleConfigurationsOfSeconds() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.SecondRange(20, 30); bldr.SecondIncrements(0, 20); }
public void TestMultipleConfigurationsOfDays() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.DayOfWeekRange(DayOfWeek.Friday, DayOfWeek.Sunday); bldr.DayOfWeekIncrements(0, 20); }
public void TestMultipleConfigurationsOfMonths() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.MonthRange(1, 7); bldr.MonthIncrements(7, 3); }
public void TestMultipleConfigurationsOfMinutes() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.MinuteRange(20, 30); bldr.MinuteIncrements(0, 20); }
public void TestMultipleConfigurationsOfDaysOfMonth() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.DayOfMonthRange(20, 30); bldr.DayOfMonthIncrements(0, 20); }
public void TestIncrementsOfDaysOfWeek() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.DayOfWeekIncrements(DayOfWeek.Sunday, 2); Assert.AreEqual("* * * ? * 1/2", bldr.CronExpression); }
public void TestRangeOfSeconds() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.SecondRange(20, 30); Assert.AreEqual("20-30 * * ? * *", bldr.CronExpression); }
public void AddHourInterval_Above23() { var builder = new CronExpressionBuilder(); var hours = 28; builder.HourInterval(hours); builder.CronExpression.ShouldEqual("* 4 * * *"); }
public void AddMinuteInterval_Above60() { var builder = new CronExpressionBuilder(); var minutes = 92; builder.MinuteInterval(minutes); builder.CronExpression.ShouldEqual("32 * * * *"); }
public void TestNthDayOfWeekOfMonth() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.NthDayOfWeekOfMonth(DayOfWeek.Sunday, 3); Assert.AreEqual("* * * ? * 1#3", bldr.CronExpression ); }
public void TestMultipleDayOfWeekEmptyList() { CronExpressionBuilder bldr = new CronExpressionBuilder(); List<DayOfWeek> desiredDays = new List<DayOfWeek>(); bldr.DayOfWeek(desiredDays); }
public void TestNearestWeekDayOfMonth() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.NearestWeekDayOfMonth(15); Assert.AreEqual("* * * 15W * ?", bldr.CronExpression); }
public void TestSpecificMonth() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.Month(2); Assert.AreEqual("* * * ? 2 *", bldr.CronExpression); }
public void TestRangeOfMonths() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.MonthRange(2, 8); Assert.AreEqual("* * * ? 2-8 *", bldr.CronExpression); }
public void TestIncrementsOfMonths() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.MonthIncrements(3, 5); Assert.AreEqual("* * * ? 3/5 *", bldr.CronExpression); }
public void TestSpecificHour() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.Hour(10); Assert.AreEqual("* * 10 ? * *", bldr.CronExpression); }
public void TestRangeOfHours() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.HourRange(20, 22); Assert.AreEqual("* * 20-22 ? * *", bldr.CronExpression); }
public void TestMultipleDayOfMonthEmptyList() { CronExpressionBuilder bldr = new CronExpressionBuilder(); List<int> desiredDays = new List<int>(); bldr.DayOfMonth(desiredDays); }
public void TestLastDayOfWeek() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.LastDayOfWeek(); Assert.AreEqual("* * * ? * L", bldr.CronExpression); }
public void TestLastDayOfWeekInMonth() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.LastDayOfWeekInMonth(DayOfWeek.Thursday); Assert.AreEqual("* * * ? * 5L", bldr.CronExpression); }
public void TestIncrementsOfDaysOfMonth() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.DayOfMonthIncrements(1, 5); Assert.AreEqual("* * * 1/5 * ?", bldr.CronExpression); }
public void TestMultipleSecondEmptyList() { CronExpressionBuilder bldr = new CronExpressionBuilder(); List<int> desiredSeconds = new List<int>(); bldr.Second(desiredSeconds); }
public void TestLastDayOfMonth() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.LastDayOfMonth(); Assert.AreEqual("* * * L * ?", bldr.CronExpression); }
public void TestIncrementsOfSeconds() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.SecondIncrements(0, 10); Assert.AreEqual("0/10 * * ? * *", bldr.CronExpression); }
public void TestSpecificMinute() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.Minute(10); Assert.AreEqual("* 10 * ? * *", bldr.CronExpression); }
public void TestRangeOfMinutes() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.MinuteRange(20, 30); Assert.AreEqual("* 20-30 * ? * *", bldr.CronExpression); }
public void TestMultipleMinuteEmptyList() { CronExpressionBuilder bldr = new CronExpressionBuilder(); List<int> desiredMinutes = new List<int>(); bldr.Minute(desiredMinutes); }
public void TestIncrementsOfMinutes() { CronExpressionBuilder bldr = new CronExpressionBuilder(); bldr.MinuteIncrements(0, 10); Assert.AreEqual("* 0/10 * ? * *", bldr.CronExpression); }
public JobRecurringJob(IPrinter printer) : base(CronExpressionBuilder.MinuteInterval(1)) { _printer = printer; }
public MinutesExpressionBuilder(CronExpressionBuilder cronExpressionBuilder) { this.field = new MinutesField(); this.expressionBuilder = new HoursExpressionBuilder(cronExpressionBuilder); }
public DayOfTheWeekExpressionBuilder(CronExpressionBuilder cronExpressionBuilder) { this.field = new DayOfWeekField(); this.expressionBuilder = new YearExpressionBuilder(cronExpressionBuilder); }
public HoursExpressionBuilder(CronExpressionBuilder cronExpressionBuilder) { this.field = new HoursField(); this.expressionBuilder = new DayOfTheMonthExpressionBuilder(cronExpressionBuilder); }
internal void GivenIHaveACronExpressionBuilder() { this.cronExpressionBuilder = new CronExpressionBuilder(); }
public MonthExpressionBuilder(CronExpressionBuilder cronExpressionBuilder) { this.field = new MonthField(); this.expressionBuilder = new DayOfTheWeekExpressionBuilder(cronExpressionBuilder); }