コード例 #1
0
        public void TestSelectSortAscending1()
        {
            int[] array = new int[] { 6, 3, 9, 2, 1, 0, 8, 15, -4, -3, 11, 4, 6 };
            FindMaximumElementInArray.SelectSortDescending(array);

            int[] expectedSortedArray = new int[] { 15, 11, 9, 8, 6, 6, 4, 3, 2, 1, 0, -3, -4 };

            CollectionAssert.AreEqual(expectedSortedArray, array);
        }
コード例 #2
0
        public void TestSelectSortAscending2_ThrowsException()
        {
            FindMaximumElementInArray.SelectSortDescending((int[])null);

            Assert.Fail();
        }