Top Description Fields Constructors Methods
org.assertj.core.api

public abstract Class Abstract2DArrayAssert<SELF extends Abstract2DArrayAssert<SELF, ACTUAL, ELEMENT>, ACTUAL, ELEMENT>

extends AbstractAssert<SELF extends Abstract2DArrayAssert<SELF, ACTUAL, ELEMENT>, ACTUAL>
implements Array2DAssert<SELF extends Abstract2DArrayAssert<SELF, ACTUAL, ELEMENT>, ELEMENT>
Class Inheritance
All Implemented Interfaces
org.assertj.core.api.Array2DAssert
Known Direct Subclasses
org.assertj.core.api.Float2DArrayAssert, org.assertj.core.api.Int2DArrayAssert, org.assertj.core.api.Object2DArrayAssert, org.assertj.core.api.Boolean2DArrayAssert, org.assertj.core.api.Short2DArrayAssert, org.assertj.core.api.Byte2DArrayAssert, org.assertj.core.api.Char2DArrayAssert, org.assertj.core.api.Long2DArrayAssert, org.assertj.core.api.Double2DArrayAssert
Type Parameters
<SELF>
the "self" type of this assertion class.
<ACTUAL>
the type of the "actual" value which is a two-dimensional Array of ELEMENT.
<ELEMENT>
the type of the "actual" array element.

Base class for all two-dimensional array assertions.
Author
Maciej Wajcht
Since
3.17.0

Field Summary

Inherited from org.assertj.core.api.AbstractAssert:
actualassertionErrorCreatorconditionscustomRepresentationinfomyselfobjectsprintAssertionsDescriptionthrowUnsupportedExceptionOnEquals

Constructor Summary

AccessConstructor and Description
protected
Abstract2DArrayAssert(final ACTUAL actual, final Class<?> selfType)

Method Summary

Modifier and TypeMethod and Description
public abstract SELF

Returns:

this assertion object.
isDeepEqualTo
(ACTUAL
the given value to compare the actual value to.
expected
)

Verifies that the actual 2D array is deeply equal to the given one.

Inherited from org.assertj.core.api.AbstractAssert:
areEqualasInstanceOfasListassertionErrorasStringdescribedAsdescriptionTextdoesNotHavedoesNotHaveSameClassAsdoesNotHaveSameHashCodeAsdoesNotHaveToStringdoesNotHaveToStringequalsextractingextractingfailurefailureWithActualExpectedfailWithActualExpectedAndMessagefailWithMessagegetWritableAssertionInfohashashCodehasSameClassAshasSameHashCodeAshasToStringhasToStringinBinaryinHexadecimalisisElementOfCustomAssertisEqualToisExactlyInstanceOfisInisInisInstanceOfisInstanceOfAnyisInstanceOfSatisfyingisNotisNotEqualToisNotExactlyInstanceOfisNotInisNotInisNotInstanceOfisNotInstanceOfAnyisNotNullisNotOfAnyClassInisNotSameAsisNullisOfAnyClassInisSameAsmatchesmatchesnewListAssertInstanceoverridingErrorMessageoverridingErrorMessagesatisfiessatisfiessatisfiessatisfiesAnyOfsatisfiesAnyOfsatisfiesAnyOfForProxysatisfiesForProxysetCustomRepresentationsetDescriptionConsumersetPrintAssertionsDescriptionthrowAssertionErrorusingComparatorusingComparatorusingDefaultComparatorusingRecursiveAssertionusingRecursiveAssertionusingRecursiveComparisonusingRecursiveComparisonwithAssertionStatewithFailMessagewithFailMessagewithRepresentationwithThreadDumpOnError

Constructor Detail

Abstract2DArrayAssertback to summary
protected Abstract2DArrayAssert(final ACTUAL actual, final Class<?> selfType)

Method Detail

isDeepEqualToback to summary
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:ACTUAL

the given value to compare the actual value to.

Returns:SELF

this assertion object.

Exceptions
AssertionError:
if the actual 2D array is not deeply equal to the given one.