public void Return_scheduling_decision_for_child_when_all_of_its_parents_are_completed() { _eventsBuilder.AddNewEvents(CompletedActivityEventGraph(_activityName, _activityVersion, _positionalName)); _eventsBuilder.AddNewEvents(CompletedActivityEventGraph(_siblingActivityName, _siblingActivityVersion)); var workflow = new WorkflowWithMultipleParents(); var decisions = workflow.Decisions(_eventsBuilder.Result()); Assert.That(decisions, Is.EquivalentTo(new[] { new ScheduleActivityDecision(Identity.New("Transcode", "2.0").ScheduleId()) })); }
public void Does_not_schedule_the_child_when_one_of_its_parent_activity_is_active() { _eventsBuilder.AddProcessedEvents(_eventGraphBuilder .ActivityScheduledGraph(Identity.New(_siblingActivityName, _siblingActivityVersion).ScheduleId()) .ToArray()); _eventsBuilder.AddNewEvents(CompletedActivityEventGraph(_activityName, _activityVersion, _positionalName)); var workflow = new WorkflowWithMultipleParents(); var decisions = workflow.Decisions(_eventsBuilder.Result()); CollectionAssert.IsEmpty(decisions); }