Example #1
0
 public WatermarkTest(ContainerHostMethodFixture containerHost)
 {
     _containerHost = containerHost;
     _textBox       = new TextBox {
         Width             = 300,
         VerticalAlignment = VerticalAlignment.Center
     };
 }
Example #2
0
        public RHistoryViewModelTest(IServiceContainer services, ContainerHostMethodFixture containerHost)
        {
            _containerHost = containerHost;
            _history       = (IRHistoryVisual)services.GetService <IRInteractiveWorkflowVisualProvider>().GetOrCreate().History;

            var containerFactory = services.GetService <IRHistoryVisualComponentContainerFactory>();

            _historyVisualComponent = UIThreadHelper.Instance.Invoke(() => _history.GetOrCreateVisualComponent(containerFactory));
        }
Example #3
0
        public RHistoryViewModelTest(IExportProvider exportProvider, ContainerHostMethodFixture containerHost)
        {
            _containerHost = containerHost;
            _history       = exportProvider.GetExportedValue <IRInteractiveWorkflowProvider>().GetOrCreate().History;

            var containerFactory = exportProvider.GetExportedValue <IRHistoryVisualComponentContainerFactory>();

            _historyVisualComponent = UIThreadHelper.Instance.Invoke(() => _history.GetOrCreateVisualComponent(containerFactory));
        }
Example #4
0
        public RPlotIntegrationUITest(IServiceContainer services, ContainerHostMethodFixture containerHost)
        {
            _containerHost = containerHost;
            _plotDeviceVisualComponentContainerFactory = services.GetService <TestRPlotDeviceVisualComponentContainerFactory>();

            // Don't override the standard behavior of using the control size
            _plotDeviceVisualComponentContainerFactory.DeviceProperties = null;
            _plotHistoryVisualComponentContainerFactory = services.GetService <IRPlotHistoryVisualComponentContainerFactory>();
            _workflow            = services.GetService <IRInteractiveWorkflowVisualProvider>().GetOrCreate();
            _plotVisual          = (IRPlotManagerVisual)_workflow.Plots;
            _plotVisualComponent = UIThreadHelper.Instance.Invoke(() => _workflow.Plots.GetOrCreateVisualComponent(_plotDeviceVisualComponentContainerFactory, PlotWindowInstanceId));
            UIThreadHelper.Instance.Invoke(() => ((IRPlotManagerVisual)_workflow.Plots).RegisterVisualComponent(_plotVisualComponent));
        }
Example #5
0
        public RPlotIntegrationUITest(IExportProvider exportProvider, ContainerHostMethodFixture containerHost)
        {
            _containerHost  = containerHost;
            _exportProvider = exportProvider;
            _exportProvider.GetExportedValue <TestRInteractiveWorkflowProvider>();
            _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();
            _plotVisualComponent = UIThreadHelper.Instance.Invoke(() => _workflow.Plots.GetOrCreateVisualComponent(_plotDeviceVisualComponentContainerFactory, PlotWindowInstanceId));
            UIThreadHelper.Instance.Invoke(() => _workflow.Plots.RegisterVisualComponent(_plotVisualComponent));
        }
Example #6
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));
 }