public void CreateUniqueList_of_String_BaseList_Null_Returns_CheckList()
        {
            List <string> checkList = new List <string> {
                "Foo", "Bar"
            };
            IList <string> uniqueList = new List <string>(ListLibrary.MergeUnique(checkList, null));

            Assert.AreEqual(uniqueList.Count, checkList.Count);
            Assert.AreEqual(checkList[0], uniqueList[0]);
            Assert.AreEqual(checkList[1], uniqueList[1]);
        }
        public void CreateUniqueList_of_String_CheckList_Null_Returns_BaseList()
        {
            List <string> baseList = new List <string> {
                "Bar", "Moo", "Nar"
            };

            IList <string> uniqueList = new List <string>(ListLibrary.MergeUnique(null, baseList));

            Assert.AreEqual(uniqueList.Count, baseList.Count);
            Assert.AreEqual(baseList[0], uniqueList[0]);
            Assert.AreEqual(baseList[1], uniqueList[1]);
            Assert.AreEqual(baseList[2], uniqueList[2]);
        }
        public void CreateUniqueList_of_String_And_Different_List_Types_Returns_Unique_List_of_Merged_Lists()
        {
            ObservableCollection <string> checkList = new ObservableCollection <string> {
                "Foo", "Bar"
            };
            Collection <string> baseList = new Collection <string> {
                "Bar", "Moo", "Nar"
            };
            List <string> resultList = new List <string> {
                "Bar", "Moo", "Nar", "Foo"
            };

            IList <string> uniqueList = new List <string>(ListLibrary.MergeUnique(checkList, baseList));

            Assert.AreEqual(resultList[0], uniqueList[0]);
            Assert.AreEqual(resultList[1], uniqueList[1]);
            Assert.AreEqual(resultList[2], uniqueList[2]);
            Assert.AreEqual(resultList[3], uniqueList[3]);
        }
        public void CreateUniqueList_of_String_Returns_Unique_List_of_Merged_Lists()
        {
            List <string> checkList = new List <string> {
                "Foo", "Bar"
            };
            List <string> baseList = new List <string> {
                "Bar", "Moo", "Nar"
            };
            List <string> resultList = new List <string> {
                "Bar", "Moo", "Nar", "Foo"
            };

            IList <string> uniqueList = new List <string>(ListLibrary.MergeUnique(checkList, baseList));

            Assert.AreEqual(resultList[0], uniqueList[0]);
            Assert.AreEqual(resultList[1], uniqueList[1]);
            Assert.AreEqual(resultList[2], uniqueList[2]);
            Assert.AreEqual(resultList[3], uniqueList[3]);
        }
        public void CreateUniqueList_of_String_CheckList_Null_And_BaseList_Null_Returns_Empty()
        {
            IList <string> uniqueList = new List <string>(ListLibrary.MergeUnique(null, null));

            Assert.IsEmpty(uniqueList);
        }