ELEMENT - the type of elements of the 2D array.public class Object2DArrays<ELEMENT> extends Object
| Constructor and Description |
|---|
Object2DArrays() |
| Modifier and Type | Method and Description |
|---|---|
void |
assertContains(AssertionInfo info,
ELEMENT[][] actual,
ELEMENT[] value,
Index index)
Verifies that the given array contains the given object at the given index.
|
void |
assertDoesNotContain(AssertionInfo info,
ELEMENT[][] actual,
ELEMENT[] value,
Index index)
Verifies that the given array does not contain the given object at the given index.
|
void |
assertEmpty(AssertionInfo info,
ELEMENT[][] actual)
Asserts that the given array is empty.
|
void |
assertHasDimensions(AssertionInfo info,
ELEMENT[][] actual,
int expectedFirstDimension,
int expectedSecondDimension)
Asserts that the number of elements in the given array is equal to the expected one.
|
void |
assertHasSameDimensionsAs(AssertionInfo info,
ELEMENT[][] actual,
Object other)
Assert that the actual array has the same dimensions as the other array.
|
void |
assertNotEmpty(AssertionInfo info,
ELEMENT[][] actual)
Asserts that the given array is not empty.
|
void |
assertNullOrEmpty(AssertionInfo info,
ELEMENT[][] actual)
Asserts that the given array is
null or empty. |
void |
assertNumberOfRows(AssertionInfo info,
ELEMENT[][] actual,
int expectedNumberOfRows)
Asserts that the number of rows in the given array is equal to the expected one.
|
static <ELEMENT> Object2DArrays<ELEMENT> |
instance()
Returns the singleton instance of this class.
|
public static <ELEMENT> Object2DArrays<ELEMENT> instance()
ELEMENT - the type of elements of the 2D array.public void assertNullOrEmpty(AssertionInfo info, ELEMENT[][] actual)
null or empty.info - contains information about the assertion.actual - the given array.AssertionError - if the given array is not null *and* contains one or more elements.public void assertEmpty(AssertionInfo info, ELEMENT[][] actual)
info - contains information about the assertion.actual - the given array.AssertionError - if the given array is null.AssertionError - if the given array is not empty.public void assertNotEmpty(AssertionInfo info, ELEMENT[][] actual)
info - contains information about the assertion.actual - the given array.AssertionError - if the given array is null.AssertionError - if the given array is empty.public void assertHasDimensions(AssertionInfo info, ELEMENT[][] actual, int expectedFirstDimension, int expectedSecondDimension)
info - contains information about the assertion.actual - the given array.expectedFirstDimension - the expected first dimension size of actual.expectedSecondDimension - the expected second dimension size of actual.AssertionError - if the given array is null.AssertionError - if the actual array's dimensions are not equal to the given ones.public void assertHasSameDimensionsAs(AssertionInfo info, ELEMENT[][] actual, Object other)
info - contains information about the assertion.actual - the given array.other - the group to compareAssertionError - if the actual group is null.AssertionError - if the other group is null.AssertionError - if the actual group does not have the same dimension.public void assertNumberOfRows(AssertionInfo info, ELEMENT[][] actual, int expectedNumberOfRows)
info - contains information about the assertion.actual - the given array.expectedNumberOfRows - the expected first dimension size of actual.public void assertContains(AssertionInfo info, ELEMENT[][] actual, ELEMENT[] value, Index index)
info - contains information about the assertion.actual - the given array.value - the object to look for.index - the index where the object should be stored in the given array.AssertionError - if the given array is null or empty.NullPointerException - if the given Index is null.IndexOutOfBoundsException - if the value of the given Index is equal to or greater than the size of
the given array.AssertionError - if the given array does not contain the given object at the given index.public void assertDoesNotContain(AssertionInfo info, ELEMENT[][] actual, ELEMENT[] value, Index index)
info - contains information about the assertion.actual - the given array.value - the object to look for.index - the index where the object should be stored in the given array.AssertionError - if the given array is null.NullPointerException - if the given Index is null.AssertionError - if the given array contains the given object at the given index.Copyright © 2025. All rights reserved.