public void MergeArraysTest_Intertwined_Test() { var a = new[] { 1, 7, 10, 15, 19, 0, 0, 0, 0 }; var b = new[] { 2, 8, 20, 21 }; SortService.MergeSortedArrays(a, b, 5, 4); Assert.AreEqual(new[] { 1, 2, 7, 8, 10, 15, 19, 20, 21 }, a); }
public void MergeArraysTest_NotIntertwined_aLast_Test() { var a = new[] { 19, 20, 21, 29, 30, 0, 0, 0, 0 }; var b = new[] { 1, 2, 3, 4 }; SortService.MergeSortedArrays(a, b, 5, 4); Assert.AreEqual(new[] { 1, 2, 3, 4, 19, 20, 21, 29, 30 }, a); }