Exemplo n.º 1
0
        public void Cancel_request_for_multiple_items_can_be_returned_as_workflow_action()
        {
            var workflow = new WorkflowtoReturnCancelActionForMultipleItems();

            workflow.NewExecutionFor(new WorkflowHistoryEvents(new[] { new HistoryEvent() }));
            var cancelRequestEvent = new WorkflowCancellationRequestedEvent(_builder.WorkflowCancellationRequestedEvent("cause"));

            var workflowAction = cancelRequestEvent.Interpret(workflow).GetDecisions();

            Assert.That(workflowAction, Is.EquivalentTo(new WorkflowDecision[] { new CancelActivityDecision(Identity.New(_activityName, _activityVersion)), new CancelTimerDecision(Identity.Timer(_timerName)) }));
        }
Exemplo n.º 2
0
        public void Cancel_request_for_multiple_items_can_be_returned_as_workflow_action()
        {
            var workflow      = new WorkflowtoReturnCancelActionForMultipleItems();
            var historyEvents = new WorkflowHistoryEvents(new[] { _eventGraph.WorkflowCancellationRequestedEvent("cause") });

            var decisions = workflow.Decisions(historyEvents);

            Assert.That(decisions, Is.EquivalentTo(new WorkflowDecision[]
            {
                new CancelActivityDecision(Identity.New(ActivityName, ActivityVersion).ScheduleId()), new CancelTimerDecision(Identity.Timer(TimerName).ScheduleId())
            }));
        }