コード例 #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);
        }
コード例 #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"));
        }
コード例 #3
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);
 }
コード例 #4
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));
 }
コード例 #5
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"));
 }
コード例 #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));
        }