public void Equals2D_ArraysHaveDifferentElementDimension0_False() { int[,] array1 = { { 10, 20 }, { 30, 40 } }; int[,] array2 = { { 10, 20 }, { 30, 0 } }; Assert.False(ArrayUtils.Equals(array1, array2)); }
public void Equals2D_FirstArrayNotNullSecondArrayNull_False() { int[,] array = { { 10, 20 }, { 30, 40 } }; Assert.False(ArrayUtils.Equals(null, array)); }
public void Equals2D_ArraysHaveDifferentLength1_False() { int[,] array1 = { { 10, 20 }, { 30, 40 } }; int[,] array2 = { { 10, 20 }, { 30, 40 }, { 50, 60 } }; Assert.False(ArrayUtils.Equals(array1, array2)); }
public void Equals2D_ReferenceEqualsBothNotNull_True() { int[,] array = { { 10, 20 }, { 30, 40 } }; Assert.True(ArrayUtils.Equals(array, array)); }
public void Equals2D_ReferenceEqualsBothAreNull_False() { Assert.True(ArrayUtils.Equals <int>(null as int[, ], null as int[, ])); }
public void Equals1D_EqualsArraysCustomComparer_True() { int[] array1 = { 1, 2, 3, 4 }; int[] array2 = { 1, 2, 3, 4 }; Assert.True(ArrayUtils.Equals(array1, array1, EqualityComparer <int> .Default)); }
public void Equals1D_EqualsArrayNullComparer_True() { int[] array1 = { 1, 2, 3, 4 }; int[] array2 = { 1, 2, 3, 4 }; Assert.True(ArrayUtils.Equals(array1, array1, null)); }
public void Equals1D_ArraysHaveDifferentElements_Fallse() { int[] array1 = { 1, 2, 3, 4 }; int[] array2 = { 1, 2, 0, 4 }; Assert.False(ArrayUtils.Equals(array1, array2)); }
public void Equals1D_FirstArrayNotNullSecondArrayNull_False() { int[] array = { 1, 2, 3, 4 }; Assert.False(ArrayUtils.Equals(null, array)); }
public void Equals1D_ReferenceEqualsBothNotNull_True() { int[] array1 = { 1, 2, 3, 4 }; Assert.True(ArrayUtils.Equals(array1, array1)); }