Beispiel #1
0
        public void Zipper_CheckValueAtSecondIndex_SecondIndexEqualsList2Index1()
        {
            //act
            CustomListClass <int> customList1 = new CustomListClass <int>()
            {
                1, 3, 5, 7, 9
            };
            CustomListClass <int> customList2 = new CustomListClass <int>()
            {
                2, 4, 6, 8, 10
            };
            CustomListClass <int> customList3 = new CustomListClass <int>();


            //act
            customList3 = customList3.Zipper(customList1, customList2);

            // assert

            Assert.AreEqual(customList2[0], customList3[1]);
        }
Beispiel #2
0
        public void Zipper_CheckCount_CountEqualsSumofListsCount()
        {
            //act
            CustomListClass <int> customList1 = new CustomListClass <int>()
            {
                1, 3, 5, 7, 9
            };
            CustomListClass <int> customList2 = new CustomListClass <int>()
            {
                2, 4, 6, 8, 10
            };
            CustomListClass <int> customList3 = new CustomListClass <int>();
            int expectedCount = customList1.Count + customList2.Count;

            //act
            customList3 = customList3.Zipper(customList1, customList2);


            // assert

            Assert.AreEqual(expectedCount, customList3.Count);
        }