示例#1
0
        public void SortArrayUsingQuickSortTest(int[] initial, int[] expected)
        {
            // Arrange
            SortingClass class1 = new SortingClass();

            // Act
            int[] actual = class1.QuickSort(initial);
            // Assert
            Assert.AreEqual(expected, actual);
        }
示例#2
0
        public void EmptyArrayQuickSortTest()
        {
            SortingClass class1 = new SortingClass();

            Assert.Throws <ArgumentException>(() => class1.QuickSort(new int[] { }));
        }
示例#3
0
        public void NullArgumentQuickSortTest()
        {
            SortingClass class1 = new SortingClass();

            Assert.Throws <ArgumentNullException>(() => class1.QuickSort(null));
        }