Beispiel #1
0
        public static void JaggedArray_LengthHasZero_NUnit()
        {
            //Assert
            int[][] sortArr = { };

            //Arrange
            Assert.Throws <ArgumentException>(() => Jagged.SortArray(sortArr, new SortBySumElements()));
        }
Beispiel #2
0
        public static void JaggedArray_MinElementComparer_NUnit()
        {
            //Arrange
            int[][] expectedArr =
            {
                new int[] { 1, 2, 9, 6, 3 },
                new int[] { 3, 7, 2, 5, 8 },
                new int[] { 5, 4, 6, 7,3, 5 }
            };

            int[][] sortArr = (int[][])currentArr.Clone();

            //Act
            Jagged.SortArray(sortArr, new SortByMinElements());

            //Assert
            CollectionAssert.AreEqual(sortArr, expectedArr);
        }
Beispiel #3
0
 public static void JaggedArray_CheckNull_NUnit(int[][] sortArr)
 {
     //Arrange
     Assert.Throws <ArgumentNullException>(() => Jagged.SortArray(sortArr, new SortBySumElements()));
 }