public void TestTwo() { Node firstList1 = new Node(); Node firstList2 = new Node(); Node firstList3 = new Node(); Node firstList4 = new Node(); Node firstList5 = new Node(); firstList1.data = 1; firstList2.data = 2; firstList3.data = 3; firstList4.data = 4; firstList5.data = 5; firstList1.next = firstList2; firstList2.next = firstList3; firstList3.next = firstList4; firstList4.next = firstList5; Node secondList1 = new Node(); secondList1.data = 1; secondList1.next = firstList5; Node six = new Node(); six.data = 6; firstList5.next = six; six.next = null; Assert.AreEqual(5, MergePointOfTwoLists.Solution(firstList1, secondList1)); }
public void TestOne() { Node firstList1 = new Node(); Node secondList1 = new Node(); firstList1.data = 1; secondList1.data = 1; Node second = new Node(); second.data = 2; firstList1.next = second; secondList1.next = second; Node third = new Node(); third.data = 3; second.next = third; third.next = null; Assert.AreEqual(2, MergePointOfTwoLists.Solution(firstList1, secondList1)); }