예제 #1
0
 public void RecievingBuildMessage(BuildRunMessage runMessage)
 {
     var buildReport = runMessage.Results;
     var project = buildReport.Project;
     if (buildReport.ErrorCount > 0 || buildReport.WarningCount > 0)
     {
         if (buildReport.ErrorCount > 0)
         {
             string.Format(
                 "Building {0} finished with {1} errors and  {2} warningns",
                 Path.GetFileName(project),
                 buildReport.ErrorCount,
                 buildReport.WarningCount);
         }
         else
         {
             _logger.InfoFormat(
                 "Building {0} succeeded with {1} warnings",
                 Path.GetFileName(project),
                 buildReport.WarningCount);
         }
         foreach (var error in buildReport.Errors)
             _logger.InfoFormat("Error: {0}({1},{2}) {3}", error.File, error.LineNumber, error.LinePosition,
                               error.ErrorMessage);
         foreach (var warning in buildReport.Warnings)
             _logger.InfoFormat("Warning: {0}({1},{2}) {3}", warning.File, warning.LineNumber,
                               warning.LinePosition, warning.ErrorMessage);
     }
 }
 public void Should_subscribe_to_build_messages()
 {
     var message = new BuildRunMessage(new BuildRunResults(""));
     _bus.Publish<BuildRunMessage>(message);
     waitForAsyncCall();
     _resultMerger.HasMergedBuildResults.ShouldBeTrue();
     _view.BuildRunMessage.ShouldBeTheSameAs(message);
 }
예제 #3
0
 public void  RecievingBuildMessage(BuildRunMessage message)
 {
     _syncContext.Post(m => relistFromCache(), null);
 }
예제 #4
0
 public void RecievingBuildMessage(BuildRunMessage message)
 {
     _onCacheUpdate.Invoke(_resultsCache);
 }
예제 #5
0
 public BuildMessageEventArgs(BuildRunMessage runMessage)
 {
     Message = runMessage;
 }
예제 #6
0
 public void Should_be_able_to_consume_build_messages()
 {
     var consumer = new RunMessageConsumer(_bus);
     var message = new BuildRunMessage(new BuildRunResults(""));
     _bus.Publish<BuildRunMessage>(message);
     waitForAsyncCall();
     consumer.BuildMessageEventWasCalled.ShouldBeTrue();
 }
예제 #7
0
 public void RecievingBuildMessage(BuildRunMessage runMessage)
 {
     _buildRunMessage = runMessage;
 }