Package org.assertj.core.api
Class Abstract2DArrayAssert<SELF extends Abstract2DArrayAssert<SELF,ACTUAL,ELEMENT>,ACTUAL,ELEMENT>
- java.lang.Object
-
- org.assertj.core.api.AbstractAssert<SELF,ACTUAL>
-
- org.assertj.core.api.Abstract2DArrayAssert<SELF,ACTUAL,ELEMENT>
-
- 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.
- All Implemented Interfaces:
Array2DAssert<SELF,ELEMENT>
,Assert<SELF,ACTUAL>
,Descriptable<SELF>
,ExtensionPoints<SELF,ACTUAL>
- Direct Known Subclasses:
Boolean2DArrayAssert
,Byte2DArrayAssert
,Char2DArrayAssert
,Double2DArrayAssert
,Float2DArrayAssert
,Int2DArrayAssert
,Long2DArrayAssert
,Object2DArrayAssert
,Short2DArrayAssert
public abstract class Abstract2DArrayAssert<SELF extends Abstract2DArrayAssert<SELF,ACTUAL,ELEMENT>,ACTUAL,ELEMENT> extends AbstractAssert<SELF,ACTUAL> implements Array2DAssert<SELF,ELEMENT>
Base class for all two-dimensional array assertions.- Since:
- 3.17.0
- Author:
- Maciej Wajcht
-
-
Field Summary
-
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, assertionErrorCreator, conditions, customRepresentation, info, myself, objects, printAssertionsDescription, throwUnsupportedExceptionOnEquals
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Abstract2DArrayAssert(ACTUAL actual, Class<?> selfType)
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract SELF
isDeepEqualTo(ACTUAL expected)
Verifies that the actual 2D array is deeply equal to the given one.-
Methods inherited from class org.assertj.core.api.AbstractAssert
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, satisfiesAnyOf, satisfiesAnyOfForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveComparison, usingRecursiveComparison, withAssertionState, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.assertj.core.api.Array2DAssert
hasDimensions, hasSameDimensionsAs, isEmpty, isNotEmpty, isNullOrEmpty
-
Methods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs
-
-
-
-
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.
-
-