Exemple #1
0
        public void Setup()
        {
            var TempOperation = new Utilities.Workflow.Manager.OperationInvoker <dynamic>(new GenericOperation <dynamic>(x => x + 1), new IConstraint <dynamic>[] { new GenericConstraint <dynamic>(x => x > 1) });

            Assert.Equal(1, TempOperation.Constraints.Count());
            Assert.NotNull(TempOperation.Operation);
        }
Exemple #2
0
        public void Execute()
        {
            var TempOperation = new Utilities.Workflow.Manager.OperationInvoker <dynamic>(new GenericOperation <dynamic>(x => x), new List <IConstraint <dynamic> >());

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

            Assert.Equal(3, TempOperation.Execute(2));
        }