public void DsfReplaceActivity_UpdateForEachInputs_NullUpdates_DoesNothing() { //------------Setup for test-------------------------- const string FieldsToSearch = "[[Numeric(1).num]]"; const string Find = "Up"; const string Result = "[[res]]"; const string ReplaceWith = "2"; var act = new DsfReplaceActivity { FieldsToSearch = FieldsToSearch, Find = Find, ReplaceWith = ReplaceWith, Result = Result }; //------------Execute Test--------------------------- act.UpdateForEachInputs(null); //------------Assert Results------------------------- Assert.AreEqual(FieldsToSearch, act.FieldsToSearch); Assert.AreEqual(Find, act.Find); Assert.AreEqual(ReplaceWith, act.ReplaceWith); }
public void DsfReplaceActivity_UpdateForEachInputs_MoreThan1Updates_Updates() { //------------Setup for test-------------------------- const string FieldsToSearch = "[[Numeric(1).num]]"; const string Find = "Up"; const string Result = "[[res]]"; const string ReplaceWith = "2"; var act = new DsfReplaceActivity { FieldsToSearch = FieldsToSearch, Find = Find, ReplaceWith = ReplaceWith, Result = Result }; var tuple1 = new Tuple <string, string>(FieldsToSearch, "Test"); var tuple2 = new Tuple <string, string>(Find, "Test2"); var tuple3 = new Tuple <string, string>(ReplaceWith, "Test3"); //------------Execute Test--------------------------- act.UpdateForEachInputs(new List <Tuple <string, string> > { tuple1, tuple2, tuple3 }); //------------Assert Results------------------------- Assert.AreEqual("Test2", act.Find); Assert.AreEqual("Test", act.FieldsToSearch); Assert.AreEqual("Test3", act.ReplaceWith); }
public void DsfReplaceActivity_UpdateForEachInputs_MoreThan1Updates_Updates() { //------------Setup for test-------------------------- const string FieldsToSearch = "[[Numeric(1).num]]"; const string Find = "Up"; const string Result = "[[res]]"; const string ReplaceWith = "2"; var act = new DsfReplaceActivity { FieldsToSearch = FieldsToSearch, Find = Find, ReplaceWith = ReplaceWith, Result = Result }; var tuple1 = new Tuple<string, string>(FieldsToSearch, "Test"); var tuple2 = new Tuple<string, string>(Find, "Test2"); var tuple3 = new Tuple<string, string>(ReplaceWith, "Test3"); //------------Execute Test--------------------------- act.UpdateForEachInputs(new List<Tuple<string, string>> { tuple1, tuple2, tuple3 }); //------------Assert Results------------------------- Assert.AreEqual("Test2", act.Find); Assert.AreEqual("Test", act.FieldsToSearch); Assert.AreEqual("Test3", act.ReplaceWith); }
public void DsfReplaceActivity_UpdateForEachInputs_NullUpdates_DoesNothing() { //------------Setup for test-------------------------- const string FieldsToSearch = "[[Numeric(1).num]]"; const string Find = "Up"; const string Result = "[[res]]"; const string ReplaceWith = "2"; var act = new DsfReplaceActivity { FieldsToSearch = FieldsToSearch, Find = Find, ReplaceWith = ReplaceWith, Result = Result }; //------------Execute Test--------------------------- act.UpdateForEachInputs(null); //------------Assert Results------------------------- Assert.AreEqual(FieldsToSearch, act.FieldsToSearch); Assert.AreEqual(Find, act.Find); Assert.AreEqual(ReplaceWith, act.ReplaceWith); }