コード例 #1
0
        public void Can_be_returned_as_custom_action_from_workflow()
        {
            var workflow             = new WorkflowToReturnCancelRequest("id", "runid");
            var timerFiredEventGraph = _builder.TimerFiredGraph(Identity.Timer("timer1"), TimeSpan.FromSeconds(2));
            var timerEvent           = new TimerFiredEvent(timerFiredEventGraph.First(), timerFiredEventGraph);

            var decisions = timerEvent.Interpret(workflow).GetDecisions();

            Assert.That(decisions, Is.EqualTo(new [] { new CancelRequestWorkflowDecision("id", "runid") }));
        }
コード例 #2
0
        public void Can_be_returned_as_custom_action_from_workflow()
        {
            const string runId      = "runid";
            var          workflow   = new WorkflowToReturnCancelRequest("id", "other workflow runid");
            var          scheduleId = Identity.Timer("timer1").ScheduleId();

            _builder.AddNewEvents(_graphBuilder.TimerFiredGraph(scheduleId, TimeSpan.FromSeconds(2)).ToArray());
            _builder.AddWorkflowRunId(runId);

            var decisions = workflow.Decisions(_builder.Result());

            Assert.That(decisions, Is.EqualTo(new [] { new CancelRequestWorkflowDecision("id", "other workflow runid") }));
        }