Example #1
0
        public void GetWorkflowDescriptionTest_Empty()
        {
            var run      = new WorkflowRun();
            var runState = new TestRunState(new WorkflowMetadata(), run);

            Assert.That(runState.GetSafeWorkflowDescription(), Is.StringContaining(run.Id.ToString()));
        }
Example #2
0
        public void GetWorkflowDescriptionTest_MissingActivity()
        {
            var workflow = new Workflow()
            {
                Name = "wfName"
            };
            var workflowRun = new WorkflowRun()
            {
                WorkflowBeingRun = workflow
            };

            var runState = new TestRunState(new WorkflowMetadata(workflow), workflowRun);

            Assert.That(runState.GetSafeWorkflowDescription(), Is.StringContaining(workflowRun.Id.ToString()));
        }
Example #3
0
        public void GetWorkflowDescriptionTest_Normal()
        {
            var workflow = new Workflow()
            {
                Name = "wfName"
            };
            var workflowRun = new WorkflowRun()
            {
                WorkflowBeingRun = workflow
            };

            var runState = new TestRunState(new WorkflowMetadata(workflow), workflowRun);

            runState.CurrentActivity = new WfActivity()
            {
                Name = "activity"
            };

            Assert.That(runState.GetSafeWorkflowDescription(), Is.StringContaining("wfName"));
            Assert.That(runState.GetSafeWorkflowDescription(), Is.StringContaining(workflow.Id.ToString()));
            Assert.That(runState.GetSafeWorkflowDescription(), Is.StringContaining(workflowRun.Id.ToString()));
            Assert.That(runState.GetSafeWorkflowDescription(), Is.StringContaining("activity"));
            Assert.That(runState.GetSafeWorkflowDescription(), Is.StringContaining(runState.CurrentActivity.Id.ToString()));
        }