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.public abstract class Abstract2DArrayAssert<SELF extends Abstract2DArrayAssert<SELF,ACTUAL,ELEMENT>,ACTUAL,ELEMENT> extends AbstractAssert<SELF,ACTUAL> implements Array2DAssert<SELF,ELEMENT>
actual, info, myself, objects, throwUnsupportedExceptionOnEquals| Modifier | Constructor and Description |
|---|---|
protected |
Abstract2DArrayAssert(ACTUAL actual,
Class<?> selfType) |
| Modifier and Type | Method and Description |
|---|---|
abstract SELF |
isDeepEqualTo(ACTUAL expected)
Verifies that the actual 2D array is deeply equal to the given one.
|
areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waithasDimensions, hasNumberOfRows, hasSameDimensionsAs, isEmpty, isNotEmpty, isNullOrEmptyas, as, as, describedAspublic abstract SELF isDeepEqualTo(ACTUAL expected)
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}});expected - the given value to compare the actual value to.this assertion object.AssertionError - if the actual 2D array is not deeply equal to the given one.Copyright © 2025. All rights reserved.