Example #1
0
        public ProjectCommandsTest()
        {
            var connectionsProvider = VsAppShell.Current.ExportProvider.GetExportedValue <IConnectionManagerProvider>();
            var historyProvider     = VsAppShell.Current.ExportProvider.GetExportedValue <IRHistoryProvider>();
            var packagesProvider    = VsAppShell.Current.ExportProvider.GetExportedValue <IRPackageManagerProvider>();

            _interactiveWorkflowProvider = TestRInteractiveWorkflowProviderFactory.Create(connectionsProvider, historyProvider, packagesProvider);
        }
Example #2
0
 public PlotIntegrationTest(RComponentsMefCatalogFixture catalog, TestMethodFixture testMethod, TestFilesFixture testFiles)
 {
     _exportProvider            = catalog.CreateExportProvider();
     _workflowProvider          = _exportProvider.GetExportedValue <TestRInteractiveWorkflowProvider>();
     _workflow                  = _exportProvider.GetExportedValue <IRInteractiveWorkflowProvider>().GetOrCreate();
     _componentContainerFactory = _exportProvider.GetExportedValue <IInteractiveWindowComponentContainerFactory>();
     _testMethod                = testMethod.MethodInfo;
     _testFiles                 = testFiles;
 }
Example #3
0
        public ProjectCommandsTest()
        {
            var sessionProvider     = new RSessionProvider(TestCoreServices.CreateReal());
            var connectionsProvider = VsAppShell.Current.ExportProvider.GetExportedValue <IConnectionManagerProvider>();
            var historyProvider     = VsAppShell.Current.ExportProvider.GetExportedValue <IRHistoryProvider>();
            var packagesProvider    = VsAppShell.Current.ExportProvider.GetExportedValue <IRPackageManagerProvider>();

            _interactiveWorkflowProvider = TestRInteractiveWorkflowProviderFactory.Create(nameof(ProjectCommandsTest), sessionProvider, connectionsProvider, historyProvider, packagesProvider);
        }
Example #4
0
 public RPlotIntegrationTest(IExportProvider exportProvider, TestMethodFixture testMethod, TestFilesFixture testFiles)
 {
     _workflowProvider = exportProvider.GetExportedValue <TestRInteractiveWorkflowProvider>();
     _workflow         = _workflowProvider.GetOrCreate();
     _plotDeviceVisualComponentContainerFactory  = exportProvider.GetExportedValue <TestRPlotDeviceVisualComponentContainerFactory>();
     _plotHistoryVisualComponentContainerFactory = exportProvider.GetExportedValue <IRPlotHistoryVisualComponentContainerFactory>();
     _testMethod = testMethod.MethodInfo;
     _testFiles  = testFiles;
 }
 public PackageManagerIntegrationTest(RComponentsMefCatalogFixture catalog, TestMethodFixture testMethod, TestFilesFixture testFiles)
 {
     _exportProvider   = catalog.CreateExportProvider();
     _workflowProvider = _exportProvider.GetExportedValue <TestRInteractiveWorkflowProvider>();
     _testMethod       = testMethod.MethodInfo;
     _repoPath         = TestRepositories.GetRepoPath(testFiles);
     _libPath          = Path.Combine(testFiles.LibraryDestinationPath, _testMethod.Name);
     _lib2Path         = Path.Combine(testFiles.Library2DestinationPath, _testMethod.Name);
     Directory.CreateDirectory(_libPath);
     Directory.CreateDirectory(_lib2Path);
 }
 public PackageManagerIntegrationTest(RComponentsMefCatalogFixture catalog, TestMethodFixture testMethod, TestFilesFixture testFiles)
 {
     _exportProvider   = catalog.CreateExportProvider();
     _workflowProvider = _exportProvider.GetExportedValue <TestRInteractiveWorkflowProvider>();
     _testMethod       = testMethod.MethodInfo;
     _testFiles        = testFiles;
     _workflowProvider.HostClientApp = new RHostClientTestApp();
     _repo1Path = _testFiles.GetDestinationPath(Path.Combine("Repos", TestRepositories.Repo1));
     _libPath   = Path.Combine(_testFiles.GetDestinationPath("library"), _testMethod.Name);
     _lib2Path  = Path.Combine(_testFiles.GetDestinationPath("library2"), _testMethod.Name);
     Directory.CreateDirectory(_libPath);
     Directory.CreateDirectory(_lib2Path);
 }
Example #7
0
 public RPlotIntegrationUITest(RComponentsMefCatalogFixture catalog, ContainerHostMethodFixture containerHost, TestMethodFixture testMethod, TestFilesFixture testFiles)
 {
     _containerHost               = containerHost;
     _exportProvider              = catalog.CreateExportProvider();
     _workflowProvider            = _exportProvider.GetExportedValue <TestRInteractiveWorkflowProvider>();
     _workflowProvider.BrokerName = nameof(RPlotIntegrationTest);
     _plotDeviceVisualComponentContainerFactory = _exportProvider.GetExportedValue <TestRPlotDeviceVisualComponentContainerFactory>();
     // Don't override the standard behavior of using the control size
     _plotDeviceVisualComponentContainerFactory.DeviceProperties = null;
     _plotHistoryVisualComponentContainerFactory = _exportProvider.GetExportedValue <IRPlotHistoryVisualComponentContainerFactory>();
     _workflow = _exportProvider.GetExportedValue <IRInteractiveWorkflowProvider>().GetOrCreate();
     _componentContainerFactory = _exportProvider.GetExportedValue <IInteractiveWindowComponentContainerFactory>();
     _testMethod          = testMethod.MethodInfo;
     _testFiles           = testFiles;
     _plotVisualComponent = UIThreadHelper.Instance.Invoke(() => _workflow.Plots.GetOrCreateVisualComponent(_plotDeviceVisualComponentContainerFactory, PlotWindowInstanceId));
     UIThreadHelper.Instance.Invoke(() => _workflow.Plots.RegisterVisualComponent(_plotVisualComponent));
 }