コード例 #1
0
        public void SetupZeroActionsInWorkflowProcessorAndExecute()
        {
            var provider = Mock.Of <IServiceProvider>();
            var actions  = new List <ActionItem>()
            {
            };
            var workflowProcessor = new WorkflowProcessor <FakeWorkflowDataContent>(provider, actions);
            var context           = new FakeWorkflowDataContent();

            context.StringData = "0";

            context = workflowProcessor.Execute(context);
            Assert.Equal("0", context.StringData);
        }
コード例 #2
0
        public void SetupMultipleActionsInWorkflowProcessorAndExecuteInOrder()
        {
            var provider = Mock.Of <IServiceProvider>();
            var actions  = new List <ActionItem>()
            {
                new ActionItem(typeof(Action1)),
                new ActionItem(typeof(Action2)),
                new ActionItem(typeof(Action3)),
            };
            var workflowProcessor = new WorkflowProcessor <FakeWorkflowDataContent>(provider, actions);
            var context           = new FakeWorkflowDataContent();

            context.StringData = "0";

            context = workflowProcessor.Execute(context);
            Assert.Equal("0123", context.StringData);
        }