public void Should_subscribe_to_run_finished_messages()
 {
     var message = new RunFinishedMessage(null);
     _bus.Publish(message);
     waitForAsyncCall();
     _view.RunFinishedMessage.ShouldBeTheSameAs(message);
 }
Esempio n. 2
0
 public void RecievingRunFinishedMessage(RunFinishedMessage message)
 {
     var report = message.Report;
     var text = string.Format(
                 "Ran {0} build(s) ({1} succeeded, {2} failed) and {3} test(s) ({4} passed, {5} failed, {6} ignored)",
                 report.NumberOfProjectsBuilt,
                 report.NumberOfBuildsSucceeded,
                 report.NumberOfBuildsFailed,
                 report.NumberOfTestsRan,
                 report.NumberOfTestsPassed,
                 report.NumberOfTestsFailed,
                 report.NumberOfTestsIgnored);
     var runType = report.NumberOfBuildsFailed > 0 || report.NumberOfTestsFailed > 0 ? RunMessageType.Failed : RunMessageType.Succeeded;
     _onMessage.Invoke(new RunMessages(runType, text));
 }
Esempio n. 3
0
        public void  RecievingRunFinishedMessage(RunFinishedMessage message)
        {
            _syncContext.Post(
                x =>
                {
                    var report = (RunReport) x;
					var msg = string.Format(
                        "Ran {0} build(s) ({1} succeeded, {2} failed) and {3} test(s) ({4} passed, {5} failed, {6} ignored)",
                        report.NumberOfProjectsBuilt,
                        report.NumberOfBuildsSucceeded,
                        report.NumberOfBuildsFailed,
                        report.NumberOfTestsRan,
                        report.NumberOfTestsPassed,
                        report.NumberOfTestsFailed,
                        report.NumberOfTestsIgnored);
					_running = false;
                    labelRunState.Text = msg;
					if (report.NumberOfBuildsFailed > 0 || report.NumberOfTestsFailed > 0)
						labelRunState.ForeColor = Color.Red;
					if (report.NumberOfBuildsFailed == 0 && report.NumberOfTestsFailed == 0 && report.NumberOfTestsIgnored > 0)
						labelRunState.ForeColor = Color.YellowGreen;
					if (report.NumberOfBuildsFailed == 0 && report.NumberOfTestsFailed == 0 && report.NumberOfTestsIgnored == 0)
						labelRunState.ForeColor = Color.Green;
                    generateSummary(report);
					if (_configuration.NotifyOnRunCompleted)
						runNotification(msg, report);
                },
                message.Report);
        }
Esempio n. 4
0
 public void  RecievingRunFinishedMessage(RunFinishedMessage message)
 {
     _syncContext.Post(
         x =>
         {
             var report = (RunReport) x;
             labelRunState.Text = string.Format(
                 "Ran {0} build(s) ({1} succeeded, {2} failed) and {3} test(s) ({4} passed, {5} failed, {6} ignored)",
                 report.NumberOfProjectsBuilt,
                 report.NumberOfBuildsSucceeded,
                 report.NumberOfBuildsFailed,
                 report.NumberOfTestsRan,
                 report.NumberOfTestsPassed,
                 report.NumberOfTestsFailed,
                 report.NumberOfTestsIgnored);
             labelRunState.ForeColor =
                 report.NumberOfBuildsFailed > 0 ||
                 report.NumberOfTestsFailed > 0 ||
                 report.NumberOfTestsIgnored > 0
                     ? Color.Red
                     : Color.Green;
             generateSummary(report);
         },
         message.Report);
 }
Esempio n. 5
0
 public RunFinishedMessageEventArgs(RunFinishedMessage message)
 {
     Message = message;
 }
Esempio n. 6
0
 public void Should_be_able_to_consume_run_finished_messages()
 {
     var consumer = new RunMessageConsumer(_bus);
     var message = new RunFinishedMessage(null);
     _bus.Publish(message);
     waitForAsyncCall();
     consumer.RunFinishedMessageEventWasCalled.ShouldBeTrue();
 }
Esempio n. 7
0
        public void RecievingRunFinishedMessage(RunFinishedMessage message)
        {
            var report = message.Report;
            var msg = string.Format(
                "Ran {0} build(s) ({1} succeeded, {2} failed) and {3} test(s) ({4} passed, {5} failed, {6} ignored)",
                report.NumberOfProjectsBuilt,
                report.NumberOfBuildsSucceeded,
                report.NumberOfBuildsFailed,
                report.NumberOfTestsRan,
                report.NumberOfTestsPassed,
                report.NumberOfTestsFailed,
                report.NumberOfTestsIgnored);
				_logger.Info(msg);
			if (_configuration.NotifyOnRunCompleted)
				runNotification(msg, report);
        }
Esempio n. 8
0
 public void RecievingRunFinishedMessage(RunFinishedMessage message)
 {
     var report = message.Report;
     _logger.InfoFormat(
         "Ran {0} build(s) ({1} succeeded, {2} failed) and {3} test(s) ({4} passed, {5} failed, {6} ignored)",
         report.NumberOfProjectsBuilt,
         report.NumberOfBuildsSucceeded,
         report.NumberOfBuildsFailed,
         report.NumberOfTestsRan,
         report.NumberOfTestsPassed,
         report.NumberOfTestsFailed,
         report.NumberOfTestsIgnored);
 }
Esempio n. 9
0
 public void RecievingRunFinishedMessage(RunFinishedMessage message)
 {
     _runFinishedMessage = message;
 }