Ejemplo n.º 1
0
 public void Setup()
 {
     _graphBuilder = new EventGraphBuilder();
     _builder      = new HistoryEventsBuilder();
     _eventGraph   = _graphBuilder.LambdaCompletedEventGraph(Identity.Lambda(LambdaName, PositionalName).ScheduleId(), "input", "result", TimeSpan.FromSeconds(10));
     _event        = new LambdaCompletedEvent(_eventGraph.First(), _eventGraph);
 }
Ejemplo n.º 2
0
        public void Get_lambda_item_form_its_event()
        {
            var identity   = Identity.Lambda("Lambda");
            var eventGraph = _graphBuilder.LambdaCompletedEventGraph(identity.ScheduleId(), "id", "result");
            var @event     = new LambdaCompletedEvent(eventGraph.First(), eventGraph);
            var workflow   = new TestWorkflow();

            var activity = workflow.GetLambda(@event);

            Assert.That(activity, Is.EqualTo(new LambdaItem(identity, workflow)));
        }
Ejemplo n.º 3
0
        public void Throws_exception_when_lambda_scheduled_event_not_found()
        {
            var eventGraph = _graphBuilder.LambdaCompletedEventGraph(Identity.Lambda(LambdaName).ScheduleId(), "input", "result", TimeSpan.FromSeconds(10));

            Assert.Throws <IncompleteEventGraphException>(() => _event = new LambdaCompletedEvent(eventGraph.First(), Enumerable.Empty <HistoryEvent>()));
        }
Ejemplo n.º 4
0
 private WorkflowAction JumptToProcessLog(LambdaCompletedEvent @event)
 {
     return(LatestEventId > 20000 ? Continue(@event) : Jump.ToLambda("ProcessLog"));
 }