public void Clone2D_2DArraySize2x2_2DArraySize2x2() { int[,] array = { { 10, 20 }, { 30, 40 } }; int[,] clonedArray = ArrayUtils.Clone(array); Assert.AreEqual(array[0, 0], clonedArray[0, 0]); Assert.AreEqual(array[0, 1], clonedArray[0, 1]); Assert.AreEqual(array[1, 0], clonedArray[1, 0]); Assert.AreEqual(array[1, 1], clonedArray[1, 1]); }
public void Clone2D_ArrayNull_ValidateNotNull() { AssertValidation.NotNull( () => ArrayUtils.Clone(null as int[, ]), "Source"); }
public void Clone1D_1DArraySize4_1DArraySize4() { int[] array = { 1, 2, 3, 4 }; int[] clonedArray = ArrayUtils.Clone(array); Assert.True(array.SequenceEqual(clonedArray)); }