public void WhenWorkflowsIsEmpty_DoesNotUpdateState_AndExits() { // arrange _testWorkflows = Enumerable.Empty <Workflow>(); // act _workflowRunner.Run(_testWorkflows); // assert _workflowRunner.ItemsProcessed.Should().Be(default);
private void RunCheckedWorkflows() { _workflowOrchestrator = new WorkflowOrchestrator(); timer.Interval = 100; timer.Start(); Task.Run(() => { try { _workflowOrchestrator.Run(_selectedWorkflows); } catch (Exception e) { MessageBox.Show("Error: " + e.Message, "Error", MessageBoxButtons.OK); } }) .ContinueWith(task => timer.Stop(), TaskScheduler.FromCurrentSynchronizationContext()) .ContinueWith(task => SetIdleState(), TaskScheduler.FromCurrentSynchronizationContext()); }