コード例 #1
0
        public void Is_received_true()
        {
            _builder.AddProcessedEvents(_graphBuilder.WorkflowSignaledEvent(SignalName.ToUpper(), "input"));
            _workflow.SetupGet(w => w.WorkflowHistoryEvents).Returns(_builder.Result());

            Assert.That(_signal.IsReceived(), Is.True);
        }
コード例 #2
0
 public void Setup()
 {
     _graphBuilder = new EventGraphBuilder();
     _builder      = new HistoryEventsBuilder();
     _builder.AddProcessedEvents(_graphBuilder.WorkflowStartedEvent());
     _workflow = new Mock <IWorkflow>();
     _workflow.SetupGet(w => w.WorkflowHistoryEvents).Returns(_builder.Result());
 }
コード例 #3
0
 public void Setup()
 {
     _identity          = Identity.New(WorkflowName, Version, PositionalName);
     _scheduleIdentity  = _identity.ScheduleId(WorkflowRunId);
     _eventGraphBuilder = new EventGraphBuilder();
     _builder           = new HistoryEventsBuilder().AddWorkflowRunId(WorkflowRunId);
     _builder.AddProcessedEvents(_eventGraphBuilder.WorkflowStartedGraph("input").ToArray());
     _workflow = new Mock <IWorkflow>();
     _workflow.SetupGet(w => w.WorkflowHistoryEvents)
     .Returns(_builder.Result());
 }
コード例 #4
0
        public void Fail_workflow_for_child_workflow_reschedule_timer()
        {
            const string workflowRunid = "rid";
            var          builder       = new HistoryEventsBuilder().AddWorkflowRunId(workflowRunid);

            builder.AddNewEvents(TimerCancellationFailedEventGrpah(Identity.New(WorkflowName, WorkflowVersion).ScheduleId(workflowRunid), Cause));

            var decisions = new WorkflowWithChildWorkflow().Decisions(builder.Result());

            Assert.That(decisions, Is.EqualTo(new[] { new FailWorkflowDecision("RESCHEDULE_TIMER_CANCELLATION_FAILED", Cause) }));
        }
コード例 #5
0
        public void Fail_workflow_for_child_workflow_reshedule_timer()
        {
            const string workflowRunid = "rid";
            var          identity      = Identity.New(WorkflowName, WorkflowVersion).ScheduleId(workflowRunid);
            var          builder       = new HistoryEventsBuilder().AddWorkflowRunId(workflowRunid);

            builder.AddNewEvents(TimerStartFailedEventGraph(identity, TimerFailureCause));

            var decisions = new WorkflowWithChildWorkflow().Decisions(builder.Result());

            Assert.That(decisions, Is.EqualTo(new[] { new FailWorkflowDecision("RESCHEDULE_TIMER_START_FAILED", TimerFailureCause) }));
        }