Example #1
0
 private TimeSpan addLinePrAction(RunAction action, TimeSpan total, StringBuilder builder)
 {
     var state = action.Succeeded ? "succeeded" : "failed";
     var project = Path.GetFileName(action.Project);
     var timeSpent = action.TimeSpent;
     return addLineByType(action, total, timeSpent, builder, state, project);
 }
Example #2
0
 private TimeSpan addTestLine(RunAction action, TimeSpan total, TimeSpan timeSpent, StringBuilder builder, string state, string project)
 {
     total = total.Add(timeSpent);
     var assembly = Path.GetFileName(action.Assembly);
     builder.AppendLine(string.Format("Test run for assembly {1} ({2}) {0} ({3},{4} sec)",
                                      state,
                                      assembly,
                                      project,
                                      timeSpent.Seconds.ToString(),
                                      timeSpent.Milliseconds.ToString()));
     return total;
 }
Example #3
0
 private TimeSpan addLineByType(RunAction action, TimeSpan total, TimeSpan timeSpent, StringBuilder builder, string state, string project)
 {
     switch (action.Type)
     {
         case InformationType.Build:
             total = addBuildLine(total, timeSpent, builder, state, project);
             break;
         case InformationType.TestRun:
             total = addTestLine(action, total, timeSpent, builder, state, project);
             break;
     }
     return total;
 }