示例#1
0
        public void TestGetEmptyListsDifference()
        {
            List <string> list1 = new List <string>();
            List <string> list2 = new List <string>();
            List <string> diff  = LineUtil.GetLineListsDifference(list1, list2);

            Assert.IsNotNull(diff);
            Assert.AreEqual(0, diff.Count);
        }
示例#2
0
        public void TestGetNonEmptyListsDifference()
        {
            List <string> list1 = new List <string>();

            list1.Add("hello");
            list1.Add("hi");
            List <string> list2 = new List <string>();

            list2.Add("hello");
            list2.Add("world");

            List <string> diff = LineUtil.GetLineListsDifference(list1, list2);

            Assert.IsNotNull(diff);
            Assert.AreEqual(1, diff.Count);

            IEnumerator <string> iter = diff.GetEnumerator();

            iter.MoveNext();
            Assert.AreEqual("world", (string)iter.Current);
        }