public void Can_be_returned_as_custom_action_in_workflow()
        {
            var workflow = new WorkflowWithCustomContinue();

            _eventsBuilder.AddNewEvents(FailedActivityEventGraph(_activityName, _activityVersion, _positionalName));
            var decisions = workflow.Decisions(_eventsBuilder.Result());

            Assert.That(decisions, Is.EqualTo(new [] { new CompleteWorkflowDecision("Workflow is completed.") }));
        }
        public void Can_be_returned_as_custom_action_in_workflow()
        {
            var workflow            = new WorkflowWithCustomContinue();
            var activityFailedEvent = CreateFailedActivityEventGraph(_activityName, _activityVersion, _positionalName);

            var decisions = activityFailedEvent.InterpretNewEventsFor(workflow);

            Assert.That(decisions, Is.EquivalentTo(WorkflowAction.ContinueWorkflow(new ActivityItem(Identity.New(_activityName, _activityVersion, _positionalName), workflow)).GetDecisions()));
        }