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); }
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))); }
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>())); }
private WorkflowAction JumptToProcessLog(LambdaCompletedEvent @event) { return(LatestEventId > 20000 ? Continue(@event) : Jump.ToLambda("ProcessLog")); }