Beispiel #1
0
        public void Can_be_returned_as_custom_action_from_workflow()
        {
            var workflow             = new WorkflowToReturnSignal("name", "input", "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 SignalWorkflowDecision("name", "input", "id", "runid") }));
        }
Beispiel #2
0
        public void Can_be_returned_as_custom_action_from_workflow()
        {
            var workflow             = new WorkflowToReturnSignal("name", "input", "id", "runid");
            var timerFiredEventGraph = _graphBuilder.TimerFiredGraph(Identity.Timer("timer1").ScheduleId(), TimeSpan.FromSeconds(2));

            _builder.AddNewEvents(timerFiredEventGraph.ToArray());

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

            Assert.That(decisions, Is.EqualTo(new [] { new SignalWorkflowDecision("name", "input", "id", "runid") }));
        }