Beispiel #1
0
        public void DsfDataSplitActivity_UpdateForEachInputs_NullUpdates_DoesNothing()
        {
            //------------Setup for test--------------------------
            IList <DataSplitDTO> resultsCollection = new List <DataSplitDTO> {
                new DataSplitDTO("[[CompanyName]]", "Index", "2", 1)
            };
            var act = new DsfDataSplitActivity {
                SourceString = "[[CompanyName]]", ResultsCollection = resultsCollection
            };

            //------------Execute Test---------------------------
            act.UpdateForEachInputs(null);
            //------------Assert Results-------------------------
            Assert.AreEqual("[[CompanyName]]", act.ResultsCollection[0].OutputVariable);
        }
Beispiel #2
0
        public void DsfDataSplitActivity_UpdateForEachInputs_MoreThan1Updates_UpdatesMergeCollection()
        {
            //------------Setup for test--------------------------
            IList <DataSplitDTO> resultsCollection = new List <DataSplitDTO> {
                new DataSplitDTO("[[CompanyName]]", "Index", "2", 1), new DataSplitDTO("[[CompanyName]]", "Index", "1", 2)
            };
            var act = new DsfDataSplitActivity {
                SourceString = "[[CompanyName]]", ResultsCollection = resultsCollection
            };

            var tuple1 = new Tuple <string, string>("2", "Test");
            var tuple2 = new Tuple <string, string>("1", "Test2");
            var tuple3 = new Tuple <string, string>("[[CompanyName]]", "Test3");

            //------------Execute Test---------------------------
            act.UpdateForEachInputs(new List <Tuple <string, string> > {
                tuple1, tuple2, tuple3
            });
            //------------Assert Results-------------------------
            Assert.AreEqual("Test", act.ResultsCollection[0].At);
            Assert.AreEqual("Test2", act.ResultsCollection[1].At);
            Assert.AreEqual("Test3", act.SourceString);
        }
        public void DsfDataSplitActivity_UpdateForEachInputs_MoreThan1Updates_UpdatesMergeCollection()
        {
            //------------Setup for test--------------------------
            IList<DataSplitDTO> resultsCollection = new List<DataSplitDTO> { new DataSplitDTO("[[CompanyName]]", "Index", "2", 1), new DataSplitDTO("[[CompanyName]]", "Index", "1", 2) };
            var act = new DsfDataSplitActivity { SourceString = "[[CompanyName]]", ResultsCollection = resultsCollection };

            var tuple1 = new Tuple<string, string>("2", "Test");
            var tuple2 = new Tuple<string, string>("1", "Test2");
            var tuple3 = new Tuple<string, string>("[[CompanyName]]", "Test3");
            //------------Execute Test---------------------------
            act.UpdateForEachInputs(new List<Tuple<string, string>> { tuple1, tuple2, tuple3 });
            //------------Assert Results-------------------------
            Assert.AreEqual("Test", act.ResultsCollection[0].At);
            Assert.AreEqual("Test2", act.ResultsCollection[1].At);
            Assert.AreEqual("Test3", act.SourceString);
        }
        public void DsfDataSplitActivity_UpdateForEachInputs_NullUpdates_DoesNothing()
        {
            //------------Setup for test--------------------------
            IList<DataSplitDTO> resultsCollection = new List<DataSplitDTO> { new DataSplitDTO("[[CompanyName]]", "Index", "2", 1) };
            DsfDataSplitActivity act = new DsfDataSplitActivity { SourceString = "[[CompanyName]]", ResultsCollection = resultsCollection };

            //------------Execute Test---------------------------
            act.UpdateForEachInputs(null);
            //------------Assert Results-------------------------
            Assert.AreEqual("[[CompanyName]]", act.ResultsCollection[0].OutputVariable);
        }