예제 #1
0
파일: Disapproval.cs 프로젝트: ymf1/Wexflow
        public void DisapprovalTest()
        {
            var workflowId = 132;
            var instanceId = Helper.StartWorkflow(workflowId);

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