public void AppendToList_Returns_Appended_List()
        {
            Collection <string> originalList = new Collection <string>()
            {
                "Roo", "Rar", "Soo", "Car"
            };
            Collection <string> listToAppend = new Collection <string>()
            {
                "Foo", "Bar", "Moo", "Nar"
            };
            Collection <string> expectedResult = new Collection <string>()
            {
                "Roo", "Rar", "Soo", "Car", "Foo", "Bar", "Moo", "Nar"
            };

            List <string> appendedList = new List <string>(ListLibrary.AppendToList(originalList, listToAppend));

            Assert.IsTrue(appendedList.Count == listToAppend.Count + originalList.Count);
            Assert.AreEqual(expectedResult[0], appendedList[0]);
            Assert.AreEqual(expectedResult[1], appendedList[1]);
            Assert.AreEqual(expectedResult[2], appendedList[2]);
            Assert.AreEqual(expectedResult[3], appendedList[3]);
            Assert.AreEqual(expectedResult[4], appendedList[4]);
            Assert.AreEqual(expectedResult[5], appendedList[5]);
            Assert.AreEqual(expectedResult[6], appendedList[6]);
            Assert.AreEqual(expectedResult[7], appendedList[7]);
        }
        public void AppendToList_Returns_List_To_Append_If_Original_List_Is_Null()
        {
            Collection <string> listToAppend = new Collection <string>()
            {
                "Foo", "Bar", "Moo", "Nar"
            };

            List <string> appendedList = new List <string>(ListLibrary.AppendToList(null, listToAppend));

            Assert.IsTrue(listToAppend.Count == appendedList.Count);
            Assert.AreEqual(listToAppend[0], appendedList[0]);
            Assert.AreEqual(listToAppend[1], appendedList[1]);
            Assert.AreEqual(listToAppend[2], appendedList[2]);
            Assert.AreEqual(listToAppend[3], appendedList[3]);
        }
        public void AppendToList_Returns_Original_List_If_List_To_Append_Is_Null()
        {
            Collection <string> originalList = new Collection <string>()
            {
                "Roo", "Rar", "Soo", "Car"
            };

            List <string> appendedList = new List <string>(ListLibrary.AppendToList(originalList, null));

            Assert.IsTrue(originalList.Count == appendedList.Count);
            Assert.AreEqual(originalList[0], appendedList[0]);
            Assert.AreEqual(originalList[1], appendedList[1]);
            Assert.AreEqual(originalList[2], appendedList[2]);
            Assert.AreEqual(originalList[3], appendedList[3]);
        }
        public void AppendToList_Returns_EmptyIf_All_Lists_Are_Null()
        {
            List <string> appendedList = new List <string>(ListLibrary.AppendToList(null, null));

            Assert.IsEmpty(appendedList);
        }