public void Test1() { LinkedList <int> listA = new LinkedList <int>(); listA.AddLast(new LinkedListNode <int>(10)); listA.AddLast(new LinkedListNode <int>(5)); listA.AddLast(new LinkedListNode <int>(3)); LinkedList <int> listB = new LinkedList <int>(); listB.AddLast(new LinkedListNode <int>(14)); listB.AddLast(new LinkedListNode <int>(24)); listB.AddLast(new LinkedListNode <int>(1)); Assert.AreEqual(57, sumList.Sum(listA, listB)); }
public void SumListTest(Node <int> input1, Node <int> input2, Node <int> expected) { Node <int> sumList = SumList.Sum(input1, input2); Assert.Equal(expected, sumList); }