예제 #1
0
 public void ForDayOfMonth()
 {
     this.Given(_ => _cronEndpoint.ParametersAre(new string[] { "0", "0", "*", "0", "0", "/usr/bind/find" }))
     .When(_ => _cronEndpoint.ExecuteCron())
     .Then(_ => _cronEndpoint.DayOfMonthOutputIs("1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31"))
     .BDDfy();
 }
 public void ForDayOfMonth()
 {
     this.Given(_ => _cronEndpoint.ParametersAre(new string[] { "0", "0", "1,12,31", "0", "0", "/usr/bind/find" }))
     .When(_ => _cronEndpoint.ExecuteCron())
     .Then(_ => _cronEndpoint.DayOfMonthOutputIs("1 12 31"))
     .BDDfy();
 }
예제 #3
0
 public void ForEveryParameters()
 {
     this.Given(_ => _cronEndpoint.ParametersAre(new string[] { "*/15", "*/2", "*/5", "*/3", "*/1", "/usr/bind/find" }))
     .When(_ => _cronEndpoint.ExecuteCron())
     .Then(_ => _cronEndpoint.MinuteOutputIs("0 15 30 45"))
     .And(_ => _cronEndpoint.HourOutputIs("0 2 4 6 8 10 12 14 16 18 20 22"))
     .And(_ => _cronEndpoint.DayOfMonthOutputIs("1 6 11 16 21 26 31"))
     .And(_ => _cronEndpoint.MonthOutputIs("1 4 7 10"))
     .And(_ => _cronEndpoint.DayOfWeekOutputIs("1 2 3 4 5 6 7"))
     .BDDfy();
 }
예제 #4
0
 public void ExpectedValueForGivenInput()
 {
     this.Given(_ => _cronEndpoint.ParametersAre(new[] { "*/15", "0", "1,15", "*", "1-5", "/usr/bin/find" }))
     .When(_ => _cronEndpoint.ExecuteCron())
     .Then(_ => _cronEndpoint.MinuteOutputIs("0 15 30 45"))
     .And(_ => _cronEndpoint.HourOutputIs("0"))
     .And(_ => _cronEndpoint.DayOfMonthOutputIs("1 15"))
     .And(_ => _cronEndpoint.MonthOutputIs("1 2 3 4 5 6 7 8 9 10 11 12"))
     .And(_ => _cronEndpoint.DayOfWeekOutputIs("1 2 3 4 5"))
     .And(_ => _cronEndpoint.CommandOutputIs("/usr/bin/find"))
     .BDDfy();
 }