示例#1
0
        public void TestInsertionSorting()
        {
            int[] sortedArray = new int[10]
            {
                -1, 2, 3, 6, -5, 6, 4, -6, 9, 6
            };

            int[] array = DummyData <int> .CreateReverseArray(10000, sortedArray);

            array = Sorting.InsertionSort(array);

            bool isSorted = SearchAlgorithms.NumericlySorted(array);

            Assert.True(isSorted);
        }