Ejemplo n.º 1
0
 private void addLinePrAction(RunAction action, StringBuilder builder)
 {
     var state = action.Succeeded ? "succeeded" : "failed";
     var project = Path.GetFileName(action.Project);
     var timeSpent = action.TimeSpent;
     addLineByType(action, timeSpent, builder, state, project);
 }
Ejemplo n.º 2
0
 private void addTestLine(RunAction action, TimeSpan timeSpent, StringBuilder builder, string state, string project)
 {
     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()));
 }
Ejemplo n.º 3
0
 private void addLineByType(RunAction action, TimeSpan timeSpent, StringBuilder builder, string state, string project)
 {
     switch (action.Type)
     {
         case InformationType.Build:
             addBuildLine(timeSpent, builder, state, project);
             break;
         case InformationType.TestRun:
             addTestLine(action, timeSpent, builder, state, project);
             break;
     }
 }
Ejemplo n.º 4
0
		public void SetDataFrom(BinaryReader reader)
		{
			_numberOfBuildsSucceeded = reader.ReadInt32();
			_numberOfBuildsFailed = reader.ReadInt32();
			_numberOfTestsPassed = reader.ReadInt32();
			_numberOfTestsIgnored = reader.ReadInt32();
			_numberOfTestsFailed = reader.ReadInt32();
			var count = reader.ReadInt32();
			for (int i = 0; i < count; i++)
			{
				var action = new RunAction(InformationType.TestRun, "", new TimeSpan(0), false);
				action.SetDataFrom(reader);
				_runActions.Add(action);
			}
		}
Ejemplo n.º 5
0
        public void SetDataFrom(BinaryReader reader)
        {
            _timeSpent = TimeSpan.FromMilliseconds(reader.ReadDouble());
            _numberOfBuildsSucceeded = reader.ReadInt32();
            _numberOfBuildsFailed    = reader.ReadInt32();
            _numberOfTestsPassed     = reader.ReadInt32();
            _numberOfTestsIgnored    = reader.ReadInt32();
            _numberOfTestsFailed     = reader.ReadInt32();
            var count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                var action = new RunAction(InformationType.TestRun, "", new TimeSpan(0), false);
                action.SetDataFrom(reader);
                _runActions.Add(action);
            }
        }