Exemple #1
0
        public async Task InitializeAsync()
        {
            var settings = _services.GetService <IRSettings>();
            await _workflow.RSessions.TrySwitchBrokerAsync(nameof(RPackageManagerViewModelTest));

            await _workflow.RSession.EnsureHostStartedAsync(new RHostStartupInfo(settings.CranMirror, codePage : settings.RCodePage), null, 50000);

            await TestRepositories.SetLocalRepoAsync(_workflow.RSession, _testFiles);

            await TestLibraries.SetLocalLibraryAsync(_workflow.RSession, _testMethod, _testFiles);

            _packageManagerToolWindow = (TestToolWindow) await InUI(() => ((IRInteractiveWorkflowVisual)_workflow).ToolWindows.Packages());

            _packageManagerViewModel = (IRPackageManagerViewModel)_packageManagerToolWindow.ViewModel;
        }
Exemple #2
0
 public ConnectionManagerViewModelTest(IServiceContainer services)
 {
     _workflow = services.GetService <IRInteractiveWorkflowProvider>().GetOrCreate();
     _cmvc     = (TestToolWindow)UIThreadHelper.Instance.Invoke(() => ((IRInteractiveWorkflowVisual)_workflow).ToolWindows.Connections());
     _cmvm     = (ConnectionManagerViewModel)_cmvc.ViewModel;
 }