Пример #1
0
        public void Cancel_request_for_timer_can_be_returned_as_custom_action_from_workflow()
        {
            var workflow = new WorkflowToReturnCancelledTimerAction();
            var events   = CreateCompletedActivityEvent(ActivityName, ActivityVersion, PositionalName);

            var decisions = workflow.Decisions(events);

            Assert.That(decisions, Is.EqualTo(new [] { new CancelTimerDecision(Identity.Timer(TimerName).ScheduleId()) }));
        }
Пример #2
0
        public void By_default_cancel_request_for_timer_does_not_generate_additional_workflow_action_when_timer_is_active()
        {
            var workflow = new WorkflowToReturnCancelledTimerAction();

            _builder.AddNewEvents(TimerStartedEventGraph(TimerName));
            _builder.AddNewEvents(CompletedActivityEventGraph(ActivityName, ActivityVersion,
                                                              PositionalName));

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

            Assert.That(decisions, Is.EqualTo(new[] { new CancelTimerDecision(Identity.Timer(TimerName).ScheduleId()) }));
        }