Esempio n. 1
0
        public void Sort_CompareArraySum()
        {
            var array = new int[5][] { new int[] { 3, 5, 6 }, new int[] { 3, 5, 6, 7 }, new int[] { 3, 5 }, new int[] { 3, 5, 6, 7, 9 }, new int[] { 3 } };
            var JG    = new JaggedArray(array);

            var expected = new int[5][] { new int[] { 3 }, new int[] { 3, 5 }, new int[] { 3, 5, 6 }, new int[] { 3, 5, 6, 7 }, new int[] { 3, 5, 6, 7, 9 } };

            SortBySumOfTheElements.GetCompareElements(JG);

            CollectionAssert.AreEqual(expected, array);
        }
Esempio n. 2
0
 public void BubbleSortTest_AcceptsEmptyArray_ThrowsException(int[][] array)
 {
     Assert.Throws <ArgumentNullException>(() => SortBySumOfTheElements.GetCompareElements(new JaggedArray(array)));
 }