예제 #1
0
        public void Reverse_Sort_If_input_lenght_is_odd_it_will_order_the_list()
        {
            var arr = new int[] { 1, 3, 5, 7, 2, 4, 6 };
            var exp = new int[] { 7, 6, 5, 4, 3, 2, 1 };
            var sut = new Insertion_sort();

            sut.ReverseSort(arr);

            CollectionAssert.AreEqual(exp, arr);
        }
예제 #2
0
        public void Reverse_Sort_It_will_revers_a_list()
        {
            var arr = new int[] { 1, 2, 3, 4, 5 };
            var exp = new int[] { 5, 4, 3, 2, 1 };
            var sut = new Insertion_sort();

            sut.ReverseSort(arr);

            CollectionAssert.AreEqual(exp, arr);
        }