public void DsfNumberFormatActivity_UpdateForEachOutputs_NullUpdates_DoesNothing() { //------------Setup for test-------------------------- const string expression = "[[Numeric(1).num]]"; const string roundingType = "Up"; const string result = "[[res]]"; const string roundingDecimalPlaces = "2"; const string decimalPlacesToShow = "2"; var act = new DsfNumberFormatActivity { Expression = expression, RoundingType = roundingType, RoundingDecimalPlaces = roundingDecimalPlaces, DecimalPlacesToShow = decimalPlacesToShow, Result = result }; act.UpdateForEachOutputs(null); //------------Assert Results------------------------- Assert.AreEqual(result, act.Result); }
public void DsfNumberFormatActivity_UpdateForEachOutputs_1Updates_UpdateCommandResult() { //------------Setup for test-------------------------- const string expression = "[[Numeric(1).num]]"; const string roundingType = "Up"; const string result = "[[res]]"; const string roundingDecimalPlaces = "2"; const string decimalPlacesToShow = "2"; var act = new DsfNumberFormatActivity { Expression = expression, RoundingType = roundingType, RoundingDecimalPlaces = roundingDecimalPlaces, DecimalPlacesToShow = decimalPlacesToShow, 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); }
public void DsfNumberFormatActivity_UpdateForEachOutputs_1Updates_UpdateCommandResult() { //------------Setup for test-------------------------- const string expression = "[[Numeric(1).num]]"; const string roundingType = "Up"; const string result = "[[res]]"; const string roundingDecimalPlaces = "2"; const string decimalPlacesToShow = "2"; var act = new DsfNumberFormatActivity { Expression = expression, RoundingType = roundingType, RoundingDecimalPlaces = roundingDecimalPlaces, DecimalPlacesToShow = decimalPlacesToShow, 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); }