public void DsfCalculateActivity_UpdateForEachInputs_GivenNullUpdates_DoNothing()
        {
            //------------Setup for test--------------------------
            const string expression = "sum([[Numeric(1).num]],[[Numeric(2).num]])";
            const string result     = "[[res]]";
            var          act        = new DsfCalculateActivity {
                Expression = expression, Result = result
            };

            //------------Execute Test---------------------------
            act.UpdateForEachInputs(null);
            //------------Assert Results-------------------------
            Assert.AreEqual(expression, act.Expression);
        }
        public void DsfCalculateActivity_UpdateForEachInputs_GivenOneUpdate_UpdatesExpressionToItem2InTuple()
        {
            //------------Setup for test--------------------------
            const string expression = "sum([[Numeric(1).num]],[[Numeric(2).num]])";
            const string result     = "[[res]]";
            var          act        = new DsfCalculateActivity {
                Expression = expression, Result = result
            };
            //------------Execute Test---------------------------
            var tuple1 = new Tuple <string, string>("Test1", "Test");

            act.UpdateForEachInputs(new List <Tuple <string, string> > {
                tuple1
            });
            //------------Assert Results-------------------------
            Assert.AreEqual("Test", act.Expression);
        }
예제 #3
0
        public void DsfCalculateActivity_UpdateForEachInputs_GivenMoreThanOneUpdates_DoNothing()
        {
            //------------Setup for test--------------------------
            const string expression = "sum([[Numeric(1).num]],[[Numeric(2).num]])";
            const string result     = "[[res]]";
            var          act        = new DsfCalculateActivity {
                Expression = expression, Result = result
            };
            //------------Execute Test---------------------------
            var tuple1 = new Tuple <string, string>("Test", "Test");
            var tuple2 = new Tuple <string, string>("Test2", "Test2");

            act.UpdateForEachInputs(new List <Tuple <string, string> > {
                tuple1, tuple2
            }, null);
            //------------Assert Results-------------------------
            Assert.AreEqual(expression, act.Expression);
        }
 public void DsfCalculateActivity_UpdateForEachInputs_GivenOneUpdate_UpdatesExpressionToItem2InTuple()
 {
     //------------Setup for test--------------------------
     const string expression = "sum([[Numeric(1).num]],[[Numeric(2).num]])";
     const string result = "[[res]]";
     var act = new DsfCalculateActivity { Expression = expression, Result = result };
     //------------Execute Test---------------------------
     var tuple1 = new Tuple<string, string>("Test1", "Test");
     act.UpdateForEachInputs(new List<Tuple<string, string>> { tuple1 });
     //------------Assert Results-------------------------
     Assert.AreEqual("Test", act.Expression);
 }
 public void DsfCalculateActivity_UpdateForEachInputs_GivenNullUpdates_DoNothing()
 {
     //------------Setup for test--------------------------
     const string expression = "sum([[Numeric(1).num]],[[Numeric(2).num]])";
     const string result = "[[res]]";
     var act = new DsfCalculateActivity { Expression = expression, Result = result };
     //------------Execute Test---------------------------
     act.UpdateForEachInputs(null);
     //------------Assert Results-------------------------
     Assert.AreEqual(expression, act.Expression);
 }