public void Should_subscribe_to_run_information_messages()
 {
     var message = new RunInformationMessage(InformationType.Build, "", "", "".GetType());
     _bus.Publish(message);
     waitForAsyncCall();
     _view.RunInformationMessage.ShouldBeTheSameAs(message);
 }
Beispiel #2
0
 public void RecievingRunInformationMessage(RunInformationMessage message)
 {
     var text = "";
     switch (message.Type)
     {
         case InformationType.Build:
             text = string.Format("building {0}", Path.GetFileName(message.Project));
             break;
         case InformationType.TestRun:
             text = string.Format("testing {0}", Path.GetFileName(message.Assembly));
             break;
     }
     _onMessage.Invoke(new RunMessages(RunMessageType.Normal, text));
 }
 private void runInformationMessage(RunInformationMessage msg)
 {
     _syncContext.Post(x =>
     {
         if (!_isRunning)
             return;
         var text = "";
         var message = (RunInformationMessage)x;
         switch (message.Type)
         {
             case InformationType.Build:
                 if (ShowRunInformation)
                     text = string.Format("building {0}", Path.GetFileName(message.Project));
                 break;
             case InformationType.TestRun:
                 text = "testing...";
                 break;
             case InformationType.PreProcessing:
                 if (ShowRunInformation)
                     text = "locating affected tests";
                 break;
         }
         if (text != "") {
             setProgress(ImageStates.Progress, text.ToString(), false, null);
             printMessage(new RunMessages(RunMessageType.Normal, text.ToString()));
         }
     }, msg);
 }
 public RunInformationMessageEventArgs(RunInformationMessage message)
 {
     Message = message;
 }
 public void RecievingRunInformationMessage(RunInformationMessage message)
 {
     
 }
Beispiel #6
0
 public void Should_be_able_to_consume_run_information_messages()
 {
     var consumer = new RunMessageConsumer(_bus);
     var message = new RunInformationMessage(InformationType.Build, "", "", "".GetType());
     _bus.Publish(message);
     waitForAsyncCall();
     consumer.RunInformationMessageEventCalled.ShouldBeTrue();
 }
Beispiel #7
0
 public void RecievingRunInformationMessage(RunInformationMessage message)
 {
     var text = "";
     switch (message.Type)
     {
         case InformationType.Build:
             text = string.Format("building {0}", Path.GetFileName(message.Project));
             break;
         case InformationType.TestRun:
             text = string.Format("testing {0}", Path.GetFileName(message.Assembly));
             break;
     }
     _syncContext.Post(m => setRunInProgressFeedback(m.ToString()), text);
 }