public void AddApproverReturnTest() { IWfProcessDescriptor processDesp = ReturnExecutorTestHelper.PrepareAddApproverReturnProcessDesp(); IWfProcess process = ReturnExecutorTestHelper.StartSpecialReturnProcess(processDesp); WfProcessTestCommon.MoveToNextDefaultActivity(process); Assert.AreEqual("B", process.CurrentActivity.Descriptor.Key); WfAddApproverExecutor executor = new WfAddApproverExecutor(process.CurrentActivity, process.CurrentActivity); executor.Assignees.Add((IUser)OguObjectSettings.GetConfig().Objects["requestor"].Object); executor.ExecuteNotPersist(); Assert.AreEqual(6, process.Activities.Count, "加签后变成6个活动"); WfProcessTestCommon.MoveToNextDefaultActivity(process); //B的衍生点 Assert.AreEqual("B", process.CurrentActivity.Descriptor.AssociatedActivityKey); WfProcessTestCommon.MoveToNextDefaultActivity(process); //C的衍生点 Assert.AreEqual("C", process.CurrentActivity.Descriptor.Key); ReturnExecutorTestHelper.ExecuteReturnOperation(process.CurrentActivity, "B"); Assert.AreEqual(8, process.Activities.Count, "退回后8个活动"); Assert.AreEqual("B", process.CurrentActivity.Descriptor.AssociatedActivityKey); WfProcessTestCommon.MoveToNextDefaultActivity(process); //C的衍生点 Assert.AreEqual("C", process.CurrentActivity.Descriptor.AssociatedActivityKey); WfProcessTestCommon.MoveToNextDefaultActivity(process); //D Assert.AreEqual("D", process.CurrentActivity.Descriptor.Key); }