Class Abstract2DArrayAssert<SELF extends Abstract2DArrayAssert<SELF,​ACTUAL,​ELEMENT>,​ACTUAL,​ELEMENT>

    • Constructor Detail

      • Abstract2DArrayAssert

        protected Abstract2DArrayAssert​(ACTUAL actual,
                                        Class<?> selfType)
    • Method Detail

      • isDeepEqualTo

        public abstract SELF isDeepEqualTo​(ACTUAL expected)
        Verifies that the actual 2D array is deeply equal to the given one.

        Two arrays are considered deeply equal if both are null or if they refer to arrays that contain the same number of elements and all corresponding pairs of elements in the two arrays are deeply equal.

        Example:

         // assertion will pass
         assertThat(new int[][] {{1, 2}, {3, 4}}).isDeepEqualTo(new int[][] {{1, 2}, {3, 4}});
        
         // assertions will fail
         assertThat(new int[][] {{1, 2}, {3, 4}}).isDeepEqualTo(new int[][] {{1, 2}, {9, 10}});
         assertThat(new int[][] {{1, 2}, {3, 4}}).isDeepEqualTo(new int[][] {{1, 2, 3}, {4}});
        Parameters:
        expected - the given value to compare the actual value to.
        Returns:
        this assertion object.
        Throws:
        AssertionError - if the actual 2D array is not deeply equal to the given one.