Exemplo n.º 1
0
        public void NoSort()
        {
            // Arrange
            var sorted = new[] { -7, -5, -2, -1, 0, 2, 3, 6, 8, 10 };

            // Act
            var actual = _selectionSort.Do(sorted);

            // Assert
            CollectionAssert.AreEqual(_expected, actual.ToArray());
        }
Exemplo n.º 2
0
 static void DoSelectionSort(IEnumerable <int> unsorted)
 {
     Console.WriteLine("Selection sort:");
     var selectionSort = new SelectionSort();
     var sorted        = selectionSort.Do(unsorted);
 }