public void tSumLists() { MyLinkedList<char> list1 = new MyLinkedList<char>(); MyLinkedList<char> list2 = new MyLinkedList<char>(); MyLinkedList<char> success = new MyLinkedList<char>(); list1.AddNode('7'); list1.AddNode('1'); list1.AddNode('6'); list2.AddNode('5'); list2.AddNode('9'); list2.AddNode('2'); success.AddNode('2'); success.AddNode('1'); success.AddNode('9'); Assert.IsTrue(SumLists.Sum(list1, list2).CompareList(success)); }
public void SumListsTest(string a, string b, string sum) { Assert.Equal(sum, SumLists.Sum(Node <int> .FromString(a), Node <int> .FromString(b)).ToLinkedListString()); }