public void ZipperTwoStringLists() { //Arrange ListCustom <string> testListOne = new ListCustom <string>() { "0", "2", "4", "6" }; ListCustom <string> testListTwo = new ListCustom <string>() { "1", "3", "5" }; //Act ListCustom <string> results = testListOne.Zipper(testListOne, testListTwo); //Assert Assert.AreEqual("0", results[0]); Assert.AreEqual("1", results[1]); Assert.AreEqual("2", results[2]); Assert.AreEqual("3", results[3]); Assert.AreEqual("4", results[4]); Assert.AreEqual("5", results[5]); }
public void ZipperTwoObjectLists() { //Arrange ListCustom <Person> testListOne = new ListCustom <Person>() { new Person("test"), new Person("test"), new Person("test"), new Person("test") }; ListCustom <Person> testListTwo = new ListCustom <Person>() { new Person("test"), new Person("test"), new Person("test") }; //Act ListCustom <Person> results = testListOne.Zipper(testListOne, testListTwo); //Assert Assert.AreEqual(testListOne[0], results[0]); Assert.AreEqual(testListTwo[0], results[1]); Assert.AreEqual(testListOne[1], results[2]); Assert.AreEqual(testListTwo[1], results[3]); Assert.AreEqual(testListOne[2], results[4]); Assert.AreEqual(testListTwo[2], results[5]); }
public void ZipperTwoIntLists() { //Arrange ListCustom <int> testListOne = new ListCustom <int>() { 0, 2, 4, 6 }; ListCustom <int> testListTwo = new ListCustom <int>() { 1, 3, 5 }; //Act ListCustom <int> results = testListOne.Zipper(testListOne, testListTwo); //Assert Assert.AreEqual(0, results[0]); Assert.AreEqual(1, results[1]); Assert.AreEqual(2, results[2]); Assert.AreEqual(3, results[3]); Assert.AreEqual(4, results[4]); Assert.AreEqual(5, results[5]); }