public void DsfXPathActivity_UpdateForEachOutputs_NullUpdates_DoesNothing()
        {
            //------------Setup for test--------------------------
            _resultsCollection.Add(new XPathDTO("[[recset1(*).field1]]", "//x/a/text()", 1));
            var act = new DsfXPathActivity {
                ResultsCollection = _resultsCollection, SourceString = "xml"
            };

            act.UpdateForEachOutputs(null, null);
            //------------Assert Results-------------------------
            Assert.AreEqual("[[recset1(*).field1]]", act.ResultsCollection[0].OutputVariable);
            Assert.AreEqual("//x/a/text()", act.ResultsCollection[0].XPath);
            Assert.AreEqual("xml", act.SourceString);
        }
        public void DsfXPathActivity_UpdateForEachOutputs_1Updates_UpdateCommandResult()
        {
            //------------Setup for test--------------------------
            _resultsCollection.Add(new XPathDTO("[[recset1(*).field1]]", "//x/a/text()", 1));
            var act = new DsfXPathActivity {
                ResultsCollection = _resultsCollection, SourceString = "xml"
            };

            var tuple1 = new Tuple <string, string>("[[recset1(*).field1]]", "Test");

            //------------Execute Test---------------------------
            act.UpdateForEachOutputs(new List <Tuple <string, string> > {
                tuple1
            }, null);
            //------------Assert Results-------------------------
            Assert.AreEqual("Test", act.ResultsCollection[0].OutputVariable);
            Assert.AreEqual("//x/a/text()", act.ResultsCollection[0].XPath);
            Assert.AreEqual("xml", act.SourceString);
        }
Beispiel #3
0
        public void DsfXPathActivity_UpdateForEachOutputs_1Updates_UpdateCommandResult()
        {
            //------------Setup for test--------------------------
            _resultsCollection.Add(new XPathDTO("[[recset1(*).field1]]", "//x/a/text()", 1));
            var act = new DsfXPathActivity { ResultsCollection = _resultsCollection, SourceString = "xml" };

            var tuple1 = new Tuple<string, string>("[[recset1(*).field1]]", "Test");
            //------------Execute Test---------------------------
            act.UpdateForEachOutputs(new List<Tuple<string, string>> { tuple1 });
            //------------Assert Results-------------------------
            Assert.AreEqual("Test", act.ResultsCollection[0].OutputVariable);
            Assert.AreEqual("//x/a/text()", act.ResultsCollection[0].XPath);
            Assert.AreEqual("xml", act.SourceString);
        }
Beispiel #4
0
        public void DsfXPathActivity_UpdateForEachOutputs_NullUpdates_DoesNothing()
        {
            //------------Setup for test--------------------------
            _resultsCollection.Add(new XPathDTO("[[recset1(*).field1]]", "//x/a/text()", 1));
            var act = new DsfXPathActivity { ResultsCollection = _resultsCollection, SourceString = "xml" };

            act.UpdateForEachOutputs(null);
            //------------Assert Results-------------------------
            Assert.AreEqual("[[recset1(*).field1]]", act.ResultsCollection[0].OutputVariable);
            Assert.AreEqual("//x/a/text()", act.ResultsCollection[0].XPath);
            Assert.AreEqual("xml", act.SourceString);
        }