コード例 #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);
 }
コード例 #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()));
 }
コード例 #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;
     }
 }
コード例 #4
0
ファイル: RunReport.cs プロジェクト: roelofb/AutoTest.Net
		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);
			}
		}
コード例 #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);
            }
        }