public void Jump_down_after_joint_item_does_not_trigger_scheduling_of_joint_item_when_other_branch_is_active()
        {
            var bookHotel     = StartedActivityGraph(BookHotelActivity);
            var bookFlight    = CompletedActivityGraph(BookFlightActivity);
            var workflow      = new WorkflowWithJumpToChildBranch();
            var allEvents     = bookFlight.Concat(bookHotel);
            var historyEvents = new WorkflowHistoryEvents(allEvents, bookFlight.Last().EventId, bookFlight.First().EventId);

            var decisions = workflow.NewExecutionFor(historyEvents).Execute();

            Assert.That(decisions, Is.EquivalentTo(new[]
            {
                new ScheduleActivityDecision(Identity.New(SendEmailActivity, Version)),
            }));
        }
        [Test] // joint workflow item = item with multiple parents
        public void Jumping_down_in_branch_after_the_joint_item_triggers_scheduling_of_joint_item_when_its_all_parent_branches_are_inactive()
        {
            var bookHotel     = CompletedActivityGraph(BookHotelActivity);
            var addDinner     = CompletedActivityGraph(AddDinnerActivity);
            var bookFlight    = CompletedActivityGraph(BookFlightActivity);
            var workflow      = new WorkflowWithJumpToChildBranch();
            var allEvents     = bookFlight.Concat(addDinner).Concat(bookHotel);
            var historyEvents = new WorkflowHistoryEvents(allEvents, bookFlight.Last().EventId, bookFlight.First().EventId);

            var decisions = workflow.NewExecutionFor(historyEvents).Execute();

            Assert.That(decisions, Is.EquivalentTo(new []
            {
                new ScheduleActivityDecision(Identity.New(ChargeCustomerActivity, Version)),
                new ScheduleActivityDecision(Identity.New(SendEmailActivity, Version))
            }));
        }