Example #1
0
        public void isEqualsTest()
        {
            List <int> sequence = new List <int> {
                3, 5, 1, 3, 9, 11, 0, -1
            };
            List <int> targetSequence = sequence.ToList();

            bool isEqualsByElement = SortAlgorithms.EqualsByElements(sequence, targetSequence);

            Assert.IsTrue(isEqualsByElement);
        }
Example #2
0
        public void BinaryInsertionSortTest()
        {
            List <int> sequence = new List <int> {
                3, 5, 1, 3, 9, 11, 0, -1
            };
            List <int> targetSequence = sequence.OrderBy(r => r).ToList();

            List <int> resultSecquens = SortAlgorithms.BinaryInsertionSort(sequence);
            bool       isSorted       = SortAlgorithms.EqualsByElements(resultSecquens, targetSequence);

            Assert.IsTrue(isSorted);
        }