Beispiel #1
0
        public async Task InterruptRStatusTest()
        {
            var command = new InterruptRCommand(_workflow, _debuggerModeTracker);

            command.Should().BeInvisibleAndDisabled();

            using (await UIThreadHelper.Instance.Invoke(() => _workflow.GetOrCreateVisualComponent(_componentContainerFactory))) {
                command.Should().BeVisibleAndDisabled();

                await _workflow.RSession.BeginEvaluationAsync();

                command.Should().BeVisibleAndEnabled();

                _debuggerModeTracker.OnModeChange(DBGMODE.DBGMODE_Break);
                command.Should().BeVisibleAndDisabled();

                _debuggerModeTracker.OnModeChange(DBGMODE.DBGMODE_Run);
                command.Should().BeVisibleAndEnabled();

                command.Invoke();
                command.Should().BeVisibleAndDisabled();
            }

            command.Should().BeVisibleAndDisabled();
        }
        public async Task InterruptRStatusTest() {
            var command = new InterruptRCommand(_workflow, _debuggerModeTracker);
            command.Should().BeInvisibleAndDisabled();

            using (await UIThreadHelper.Instance.Invoke(() => _workflow.GetOrCreateVisualComponent(_componentContainerFactory))) {
                command.Should().BeVisibleAndDisabled();

                await _workflow.RSession.BeginEvaluationAsync();
                command.Should().BeVisibleAndEnabled();

                _debuggerModeTracker.OnModeChange(DBGMODE.DBGMODE_Break);
                command.Should().BeVisibleAndDisabled();

                _debuggerModeTracker.OnModeChange(DBGMODE.DBGMODE_Run);
                command.Should().BeVisibleAndEnabled();

                command.Invoke();
                command.Should().BeVisibleAndDisabled();
            }

            command.Should().BeVisibleAndDisabled();
        }