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 SyncControlModel(ProjectFolderConfiguration projectFolderConfiguration, SyncUIFeatures uiFeatureFlags, IChorusUser user) { _user = user; _progress = new MultiProgress(); StatusProgress = new SimpleStatusProgress(); _progress.Add(StatusProgress); Features = uiFeatureFlags; _synchronizer = Synchronizer.FromProjectConfiguration(projectFolderConfiguration, _progress); _backgroundWorker = new BackgroundWorker(); _backgroundWorker.WorkerSupportsCancellation = true; _backgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_backgroundWorker_RunWorkerCompleted); _backgroundWorker.DoWork += worker_DoWork; //clients will normally change these SyncOptions = new SyncOptions(); SyncOptions.CheckinDescription = "[" + Application.ProductName + ": " + Application.ProductVersion + "] sync"; SyncOptions.DoPullFromOthers = true; SyncOptions.DoMergeWithOthers = true; SyncOptions.RepositorySourcesToTry.AddRange(GetRepositoriesToList().Where(r => r.Enabled)); }