public void DsfPathCopy_UpdateForEachInputs_NullUpdates_DoesNothing() { //------------Setup for test-------------------------- var newGuid = Guid.NewGuid(); var inputPath = string.Concat(TestContext.TestRunDirectory, "\\", newGuid + "[[CompanyName]].txt"); var outputPath = string.Concat(TestContext.TestRunDirectory, "\\", newGuid + "[[CompanyName]]2.txt"); var act = new DsfPathCopy { InputPath = inputPath, OutputPath = outputPath, Result = "[[CompanyName]]" }; //------------Execute Test--------------------------- act.UpdateForEachInputs(null); //------------Assert Results------------------------- Assert.AreEqual(inputPath, act.InputPath); Assert.AreEqual(outputPath, act.OutputPath); }
public void DsfPathCopy_UpdateForEachInputs_MoreThan1Updates_Updates() { //------------Setup for test-------------------------- var newGuid = Guid.NewGuid(); var inputPath = string.Concat(TestContext.TestRunDirectory, "\\", newGuid + "[[CompanyName]].txt"); var outputPath = string.Concat(TestContext.TestRunDirectory, "\\", newGuid + "[[CompanyName]]2.txt"); var act = new DsfPathCopy { InputPath = inputPath, OutputPath = outputPath, Result = "[[CompanyName]]" }; var tuple1 = new Tuple<string, string>(outputPath, "Test"); var tuple2 = new Tuple<string, string>(inputPath, "Test2"); //------------Execute Test--------------------------- act.UpdateForEachInputs(new List<Tuple<string, string>> { tuple1, tuple2 }); //------------Assert Results------------------------- Assert.AreEqual("Test2", act.InputPath); Assert.AreEqual("Test", act.OutputPath); }