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