Esempio n. 1
0
        public void Sort_EmptyArray_Success()
        {
            var sorter = new InsertionSorter <int>();
            var array  = new int[0];

            sorter.Sort(array);

            Assert.IsTrue(sorter.Ensure(array));
        }
Esempio n. 2
0
        public void Sort_SingleElementArray_Success()
        {
            var sorter = new InsertionSorter <int>();
            var array  = new int[1] {
                0
            };

            sorter.Sort(array);

            Assert.IsTrue(sorter.Ensure(array));
        }
Esempio n. 3
0
        public void Sort_ValidArray_Success()
        {
            var sorter = new InsertionSorter <int>();
            var array  = new int[10] {
                9, 8, 7, 6, 5, 4, 3, 2, 1, 0
            };

            sorter.Sort(array);

            Assert.IsTrue(sorter.Ensure(array));
        }