Exemplo n.º 1
0
 public void FormatAsExpected(
     string minute,
     string hour,
     string dayOfMonth,
     string month,
     string dayOfWeek,
     string command)
 {
     this.Given(_ => _cronEndpoint.ParametersAre(new string[] { minute, hour, dayOfMonth, month, dayOfWeek, command }))
     .When(_ => _cronEndpoint.ExecuteCron())
     .Then(_ => _cronEndpoint.OutputShouldReturn(
               $"minute        {minute}{EndOfLineHelper.GetEndLine()}" +
               $"hour          {hour}{EndOfLineHelper.GetEndLine()}" +
               $"day of month  {dayOfMonth}{EndOfLineHelper.GetEndLine()}" +
               $"month         {month}{EndOfLineHelper.GetEndLine()}" +
               $"day of week   {dayOfWeek}{EndOfLineHelper.GetEndLine()}" +
               $"command       {command}{EndOfLineHelper.GetEndLine()}"))
     .BDDfy();
 }
Exemplo n.º 2
0
 public void CommandOutputIs(string expectedOutput)
 {
     _textWriter.GetStringBuilder().ToString().Split(EndOfLineHelper.GetEndLine()).ElementAt(5).Should()
     .Be($"command       {expectedOutput}");
 }
Exemplo n.º 3
0
 public void DayOfWeekOutputIs(string expectedOutput)
 {
     _textWriter.GetStringBuilder().ToString().Split(EndOfLineHelper.GetEndLine()).ElementAt(4).Should()
     .Be($"day of week   {expectedOutput}");
 }