public void Can_return_custom_action() { _builder.AddNewEvents(_eventGraph); var w = new TestWorkflow("result"); var decisions = w.Decisions(_builder.Result()); Assert.That(decisions, Is.EqualTo(new [] { new CompleteWorkflowDecision("result") })); }
public void Return_schedule_decisions_for_startup_items() { _eventsBuilder.AddNewEvents(_eventGraphBuilder.WorkflowStartedEvent()); var workflow = new TestWorkflow(); var workflowStartedDecisions = workflow.Decisions(_eventsBuilder.Result()); Assert.That(workflowStartedDecisions, Is.EquivalentTo(new[] { new ScheduleActivityDecision(Identity.New("Download", "1.0").ScheduleId()) })); }
public void Get_timer_by_its_event() { var identity = Identity.Timer("Timer1"); var eventGraph = _graphBuilder.TimerFiredGraph(identity.ScheduleId(), TimeSpan.FromSeconds(2)); _builder.AddNewEvents(eventGraph.ToArray()); var workflow = new TestWorkflow(); workflow.Decisions(_builder.Result()); var timer = workflow.TimerItem; Assert.That(workflow.TimerItem.Name, Is.EqualTo("Timer1")); }