public void AgreeReturnTwiceThenWithdrawTest() { IWfActivity activityB = ReturnExecutorTestHelper.PrepareAndMoveToAgreeSelectorActivity(); Assert.AreEqual("B", activityB.Descriptor.Key); SetToLineAndMSLineSelected(activityB, "C", false); SetToLineAndMSLineSelected(activityB, "A", true); Console.WriteLine("退回之前"); Console.WriteLine("当前活动{0}", activityB.Process.CurrentActivity.Descriptor.Key); ReturnExecutorTestHelper.OutputMainStream(activityB.Process); ReturnExecutorTestHelper.OutputEveryActivities((activityB.Process)); MoveAgreeProcessOneStepAndValidate(activityB.Process, 1); WfProcessTestCommon.MoveToNextDefaultActivity(activityB.Process); //To N2(B) Console.WriteLine("第二次退回之前"); Console.WriteLine("当前活动{0}", activityB.Process.CurrentActivity.Descriptor.Key); ReturnExecutorTestHelper.OutputMainStream(activityB.Process); ReturnExecutorTestHelper.OutputEveryActivities((activityB.Process)); Assert.AreEqual("N2", activityB.Process.CurrentActivity.Descriptor.Key); MoveAgreeProcessOneStepAndValidate(activityB.Process, 2); Console.WriteLine("第二次退回之后"); Console.WriteLine("当前活动{0}", activityB.Process.CurrentActivity.Descriptor.Key); ReturnExecutorTestHelper.OutputMainStream(activityB.Process); ReturnExecutorTestHelper.OutputEveryActivities(activityB.Process); Assert.AreEqual("N3", activityB.Process.CurrentActivity.Descriptor.Key); }
public void AgreeReturnTwiceTest() { IWfActivity activityB = ReturnExecutorTestHelper.PrepareAndMoveToAgreeSelectorActivity(); Assert.AreEqual("B", activityB.Descriptor.Key); SetToLineAndMSLineSelected(activityB, "C", false); SetToLineAndMSLineSelected(activityB, "A", true); Console.WriteLine("第一次退回之前,不同意"); ReturnExecutorTestHelper.OutputMainStream(activityB.Process); ReturnExecutorTestHelper.OutputEveryActivities(activityB.Process); MoveAgreeProcessAndValidate(activityB.Process, 1); Console.WriteLine("第二次退回之前,同意"); ReturnExecutorTestHelper.OutputMainStream(activityB.Process); ReturnExecutorTestHelper.OutputEveryActivities(activityB.Process); MoveAgreeProcessAndValidate(activityB.Process, 2); Console.WriteLine("第二次退回之后,同意"); ReturnExecutorTestHelper.OutputMainStream(activityB.Process); ReturnExecutorTestHelper.OutputEveryActivities(activityB.Process); ReturnExecutorTestHelper.ValidateMainStreamActivities(activityB.Process, "A", "B", "C", "D", "F"); }
public void AgreeReturnOnceThenWithdrawTest() { IWfActivity activityB = ReturnExecutorTestHelper.PrepareAndMoveToAgreeSelectorActivity(); Assert.AreEqual("B", activityB.Descriptor.Key); SetToLineAndMSLineSelected(activityB, "C", false); SetToLineAndMSLineSelected(activityB, "A", true); Console.WriteLine("退回之前"); Console.WriteLine("当前活动{0}", activityB.Process.CurrentActivity.Descriptor.Key); ReturnExecutorTestHelper.OutputMainStream(activityB.Process); ReturnExecutorTestHelper.OutputEveryActivities((activityB.Process)); MoveAgreeProcessOneStepAndValidate(activityB.Process, 1); Console.WriteLine("撤回之前"); Console.WriteLine("当前活动{0}", activityB.Process.CurrentActivity.Descriptor.Key); ReturnExecutorTestHelper.OutputMainStream(activityB.Process); ReturnExecutorTestHelper.OutputEveryActivities((activityB.Process)); IWfProcess process = DoWithdrawExecutor(activityB.Process); activityB.Process.Descriptor.Output(); Console.WriteLine("撤回之后"); Console.WriteLine("当前活动{0}", process.CurrentActivity.Descriptor.Key); ReturnExecutorTestHelper.OutputMainStream(process); ReturnExecutorTestHelper.OutputEveryActivities(process); activityB.Process.Descriptor.Output(); //activityB.Process.Descriptor.Output(); //ReturnExecutorTestHelper.ValidateMainStreamActivities(activityB.Process, "A", "B", "C", "D", "F"); }