public void OverloadPlusSignOperatorAddTwoListsStringTogether() { //Arrange CustomLists <string> myList = new CustomLists <string>(); CustomLists <string> listA = new CustomLists <string>(); listA.Add("a"); listA.Add("b"); listA.Add("c"); listA.Add("d"); listA.Add("e"); CustomLists <string> listB = new CustomLists <string>(); listB.Add("1"); listB.Add("2"); listB.Add("3"); listB.Add("4"); listB.Add("5"); string expected = "3"; //Act myList.OverloadPlusOperator(listA, listB); string actual = myList[7]; //Assert Assert.AreEqual(expected, actual); }
public void OverloadPlusSignOperatorAddTwoListsIntCount() { //Arrange CustomLists <int> myList = new CustomLists <int>(); CustomLists <int> listA = new CustomLists <int>(); listA.Add(0); listA.Add(1); listA.Add(2); listA.Add(3); listA.Add(4); CustomLists <int> listB = new CustomLists <int>(); listB.Add(4); listB.Add(3); listB.Add(2); listB.Add(1); listB.Add(0); int expected = 10; //Act myList.OverloadPlusOperator(listA, listB); int actual = myList.Count; //Assert Assert.AreEqual(expected, actual); }