示例#1
0
        public void ApprovalTest()
        {
            var workflowId = 131;
            var instanceId = Helper.StartWorkflow(workflowId);

            Thread.Sleep(500);
            Helper.ApproveWorkflow(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 > 2000);
        }