public void ExecuteTrueConstraint()
 {
     var TempWorkflow = new Workflow<dynamic>("ASDF");
     TempWorkflow.Do(new GenericOperation<dynamic>(x => x + 1));
     var TempOperation = new Utilities.Workflow.Manager.WorkflowInvoker<dynamic>(TempWorkflow, new IConstraint<dynamic>[] { new GenericConstraint<dynamic>(x => x > 1) });
     Assert.Equal(3, TempOperation.Execute(2));
 }
 public void Setup()
 {
     var TempWorkflow = new Workflow<dynamic>("ASDF");
     TempWorkflow.Do(new GenericOperation<dynamic>(x => x + 1));
     var TempOperation = new Utilities.Workflow.Manager.WorkflowInvoker<dynamic>(TempWorkflow, new IConstraint<dynamic>[] { new GenericConstraint<dynamic>(x => x > 1) });
     Assert.Equal(1, TempOperation.Constraints.Count());
     Assert.NotNull(TempOperation.Workflow);
 }
 public void Execute()
 {
     var TempWorkflow = new Workflow<dynamic>("ASDF");
     TempWorkflow.Do(new GenericOperation<dynamic>(x => x));
     var TempOperation = new Utilities.Workflow.Manager.WorkflowInvoker<dynamic>(TempWorkflow, new List<IConstraint<dynamic>>());
     Assert.Equal(1, TempOperation.Execute(1));
     Assert.Equal("A", TempOperation.Execute("A"));
 }
Exemple #4
0
        public void ExecuteTrueConstraint()
        {
            var TempWorkflow = new Workflow <dynamic>("ASDF");

            TempWorkflow.Do(new GenericOperation <dynamic>(x => x + 1));
            var TempOperation = new Utilities.Workflow.Manager.WorkflowInvoker <dynamic>(TempWorkflow, new IConstraint <dynamic>[] { new GenericConstraint <dynamic>(x => x > 1) });

            Assert.Equal(3, TempOperation.Execute(2));
        }
Exemple #5
0
        public void Setup()
        {
            var TempWorkflow = new Workflow <dynamic>("ASDF");

            TempWorkflow.Do(new GenericOperation <dynamic>(x => x + 1));
            var TempOperation = new Utilities.Workflow.Manager.WorkflowInvoker <dynamic>(TempWorkflow, new IConstraint <dynamic>[] { new GenericConstraint <dynamic>(x => x > 1) });

            Assert.Equal(1, TempOperation.Constraints.Count());
            Assert.NotNull(TempOperation.Workflow);
        }
Exemple #6
0
        public void Execute()
        {
            var TempWorkflow = new Workflow <dynamic>("ASDF");

            TempWorkflow.Do(new GenericOperation <dynamic>(x => x));
            var TempOperation = new Utilities.Workflow.Manager.WorkflowInvoker <dynamic>(TempWorkflow, new List <IConstraint <dynamic> >());

            Assert.Equal(1, TempOperation.Execute(1));
            Assert.Equal("A", TempOperation.Execute("A"));
        }