public void DisapprovalTest() { var workflowId = 126; var instanceId = Helper.StartWorkflow(workflowId); Thread.Sleep(500); Helper.DisapproveWorkflow(workflowId, instanceId); Stopwatch stopwatch = Stopwatch.StartNew(); var workflow = Helper.GetWorkflow(workflowId); var isRunning = workflow.IsRunning; while (isRunning) { Thread.Sleep(100); workflow = Helper.GetWorkflow(workflowId); isRunning = workflow.IsRunning; } stopwatch.Stop(); Assert.IsTrue(stopwatch.ElapsedMilliseconds > 3000); }