Exemplo n.º 1
0
        public void TestingMergeTwoNodes(int[] l1, int[] l2, object expected)
        {
            var sut = new MergeTwoLists();

            var list1 = sut.CreateNode(l1);
            var list2 = sut.CreateNode(l2);

            var result = sut.MergeTwoNodes(list1, list2);

            Assert.AreEqual(expected, result);
        }
Exemplo n.º 2
0
        public void TestingMergeTwoListsAnswer(int[] l1, int[] l2, object expected)
        {
            var sut = new MergeTwoLists();

            var list1 = sut.CreateNode(l1);
            var list2 = sut.CreateNode(l2);

            var tempResult = sut.MergeTwoListsAnswer(list1, list2);

            var result = sut.PrintLinkedList(tempResult);

            Assert.AreEqual(expected, result);
        }