public void Execute() { var TempOperation = new Utilities.Workflow.Manager.WorkflowNode<dynamic>(); TempOperation.AddOperation(new GenericOperation<dynamic>(x => x)); Assert.Equal(1, TempOperation.Start(1)); Assert.Equal("A", TempOperation.Start("A")); }
public void Execute() { var TempOperation = new Utilities.Workflow.Manager.WorkflowNode <dynamic>(); TempOperation.AddOperation(new GenericOperation <dynamic>(x => x)); Assert.Equal(1, TempOperation.Start(1)); Assert.Equal("A", TempOperation.Start("A")); }
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 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 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)); }