public void ErrorsEncountered_ErrorOriginatesWithOneHandler_MultiProgressHasErrorsEncountered()
		{
			var multiProgress = new MultiProgress();
			var statusProgress = new StatusProgress();
			multiProgress.Add(statusProgress);
			var consoleProgress = new ConsoleProgress();
			multiProgress.AddMessageProgress(consoleProgress);
			statusProgress.WriteError("some error happened!");
			Assert.That(multiProgress.ErrorEncountered, Is.True);
		}
		public void ErrorsEncountered_ErrorOriginatesWithMultiProgress_BothHandlersHaveErrorsEncountered()
		{
			var multiProgress = new MultiProgress();
			var statusProgress = new StatusProgress();
			multiProgress.Add(statusProgress);
			var consoleProgress = new ConsoleProgress();
			multiProgress.AddMessageProgress(consoleProgress);
			multiProgress.WriteError("error!");
			Assert.That(consoleProgress.ErrorEncountered, Is.True);
			Assert.That(statusProgress.ErrorEncountered, Is.True);
		}
        public TroubleshootingView(HgRepository repository)
        {
            _state = State.WaitingForUserToStart;
            _repository = repository;
            InitializeComponent();
            _progress = new TextBoxProgress(_outputBox);
            _statusProgress = new StatusProgress();
            _progress = new MultiProgress(new IProgress[] { new TextBoxProgress(_outputBox), _statusProgress, new LabelStatus(_statusLabel) });
            _statusLabel.Text = string.Empty;

            _backgroundWorker = new BackgroundWorker();
            _backgroundWorker.WorkerSupportsCancellation = true;
            _backgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_backgroundWorker_RunWorkerCompleted);
            _backgroundWorker.DoWork += new DoWorkEventHandler(_backgroundWorker_DoWork);
        }