public void ExecuteRepeat()
 {
     var TempOperation = new Utilities.Workflow.Manager.WorkflowNode<dynamic>();
     TempOperation.AddOperation(new GenericOperation<dynamic>(x => x + 1));
     TempOperation.Repeat(1);
     Assert.Equal(2, TempOperation.Start(1));
 }
        public void ExecuteTrueConstraint()
        {
            var TempOperation = new Utilities.Workflow.Manager.WorkflowNode <dynamic>();

            TempOperation.AddOperation(new GenericOperation <dynamic>(x => x + 1), new GenericConstraint <dynamic>(x => x > 1));
            Assert.Equal(3, TempOperation.Start(2));
        }
        public void ExecuteRepeat()
        {
            var TempOperation = new Utilities.Workflow.Manager.WorkflowNode <dynamic>();

            TempOperation.AddOperation(new GenericOperation <dynamic>(x => x + 1));
            TempOperation.Repeat(1);
            Assert.Equal(2, TempOperation.Start(1));
        }
        public void Setup()
        {
            var TempOperation = new Utilities.Workflow.Manager.WorkflowNode <dynamic>();

            TempOperation.AddOperation(new GenericOperation <dynamic>(x => x), new GenericConstraint <dynamic>(x => x > 1));
            Assert.Equal(1, TempOperation.Operations.Count());
            Assert.Equal(0, TempOperation.RepeatCount);
            Assert.Equal(0, TempOperation.RetryCount);
        }
 public void ExecuteRetry()
 {
     var Rand = new System.Random(1234);
     var TempOperation = new Utilities.Workflow.Manager.WorkflowNode<dynamic>();
     TempOperation.AddOperation(new GenericOperation<dynamic>(x =>
     {
         if (Rand.Next(1, 3) > 1)
             throw new Exception("ASDF");
         return x;
     }));
     TempOperation.Retry(10000);
     Assert.Equal(1, TempOperation.Start(1));
 }
        public void ExecuteRetry()
        {
            var Rand          = new System.Random(1234);
            var TempOperation = new Utilities.Workflow.Manager.WorkflowNode <dynamic>();

            TempOperation.AddOperation(new GenericOperation <dynamic>(x =>
            {
                if (Rand.Next(1, 3) > 1)
                {
                    throw new Exception("ASDF");
                }
                return(x);
            }));
            TempOperation.Retry(10000);
            Assert.Equal(1, TempOperation.Start(1));
        }
 public void Setup()
 {
     var TempOperation = new Utilities.Workflow.Manager.WorkflowNode<dynamic>();
     TempOperation.AddOperation(new GenericOperation<dynamic>(x => x), new GenericConstraint<dynamic>(x => x > 1));
     Assert.Equal(1, TempOperation.Operations.Count());
     Assert.Equal(0, TempOperation.RepeatCount);
     Assert.Equal(0, TempOperation.RetryCount);
 }
 public void ExecuteTrueConstraint()
 {
     var TempOperation = new Utilities.Workflow.Manager.WorkflowNode<dynamic>();
     TempOperation.AddOperation(new GenericOperation<dynamic>(x => x + 1), new GenericConstraint<dynamic>(x => x > 1));
     Assert.Equal(3, TempOperation.Start(2));
 }