public void ForMinute()
 {
     this.Given(_ => _cronEndpoint.ParametersAre(new string[] { "1,15", "0", "0", "0", "0", "/usr/bind/find" }))
     .When(_ => _cronEndpoint.ExecuteCron())
     .Then(_ => _cronEndpoint.MinuteOutputIs("1 15"))
     .BDDfy();
 }
예제 #2
0
 public void ForMinute()
 {
     this.Given(_ => _cronEndpoint.ParametersAre(new string[] { "*", "0", "0", "0", "0", "/usr/bind/find" }))
     .When(_ => _cronEndpoint.ExecuteCron())
     .Then(_ => _cronEndpoint.MinuteOutputIs(
               "0 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59"))
     .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();
 }