Esempio n. 1
0
        public void Zip_ZipTwoListsSameSize_ZippedList()
        {
            //arrange
            KyleCustomList <int> testList    = new KyleCustomList <int>();
            KyleCustomList <int> testListZip = new KyleCustomList <int>();
            KyleCustomList <int> test;
            string expected = "2,3,7,9,6,1,4,5,9,3";
            string actual;

            testList.Add(2);
            testList.Add(7);
            testList.Add(6);
            testList.Add(4);
            testList.Add(9);
            testListZip.Add(3);
            testListZip.Add(9);
            testListZip.Add(1);
            testListZip.Add(5);
            testListZip.Add(3);


            test   = testList.Zip(testListZip);
            actual = test.ToString();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 2
0
        public void Zip_ZipTwoListsEmptyFirstList_GetSecondList()
        {
            //arrange
            KyleCustomList <int> testList    = new KyleCustomList <int>();
            KyleCustomList <int> testListZip = new KyleCustomList <int>();
            KyleCustomList <int> test;

            string expected = "4,9,5,3";
            string actual;

            testListZip.Add(4);
            testListZip.Add(9);
            testListZip.Add(5);
            testListZip.Add(3);


            test   = testList.Zip(testListZip);
            actual = test.ToString();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 3
0
        public void Zip_ZipTwoListsEmptySecondList_GetFirstList()
        {
            //arrange
            KyleCustomList <int> testList    = new KyleCustomList <int>();
            KyleCustomList <int> testListZip = new KyleCustomList <int>();
            KyleCustomList <int> test;

            string expected = "2,7,6,4,9";
            string actual;

            testList.Add(2);
            testList.Add(7);
            testList.Add(6);
            testList.Add(4);
            testList.Add(9);


            test   = testList.Zip(testListZip);
            actual = test.ToString();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 4
0
        public void Zip_ZipTwoListsHeavySecondList_ZippedListWithExtra()
        {
            //arrange
            KyleCustomList <int> testList    = new KyleCustomList <int>();
            KyleCustomList <int> testListZip = new KyleCustomList <int>();
            KyleCustomList <int> test;
            string expected = "2,4,7,9,1,5,3";
            string actual;

            testList.Add(2);
            testList.Add(7);
            testListZip.Add(4);
            testListZip.Add(9);
            testListZip.Add(1);
            testListZip.Add(5);
            testListZip.Add(3);


            test   = testList.Zip(testListZip);
            actual = test.ToString();

            Assert.AreEqual(expected, actual);
        }