Package org.assertj.core.error
Class ShouldHaveSize
java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
org.assertj.core.error.ShouldHaveSize
- All Implemented Interfaces:
ErrorMessageFactory
Creates an error message indicating that an assertion that verifies that a value have certain size failed.
-
Field Summary
FieldsFields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format, formatter -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateShouldHaveSize(File actual, long expectedSize) privateShouldHaveSize(Object actual, int actualSize, int expectedSize) privateShouldHaveSize(Object actual, int actualSize, int expectedSize, int firstDimensionArrayIndex) privateShouldHaveSize(Path actual, long expectedSize) -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorMessageFactoryshouldHaveSize(File actual, long expectedSize) Creates a newfor file size.ShouldHaveSizestatic ErrorMessageFactoryshouldHaveSize(Object actual, int actualSize, int expectedSize) Creates a new.ShouldHaveSizestatic ErrorMessageFactoryshouldHaveSize(Object actual, int actualSize, int expectedSize, int firstDimensionArrayIndex) Creates a new.ShouldHaveSizestatic ErrorMessageFactoryshouldHaveSize(Path actual, long expectedSize) Creates a newfor Path file sizeShouldHaveSizeMethods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
Field Details
-
SHOULD_HAVE_FILE_SIZE
- See Also:
-
SHOULD_HAVE_PATH_SIZE
- See Also:
-
-
Constructor Details
-
ShouldHaveSize
-
ShouldHaveSize
private ShouldHaveSize(Object actual, int actualSize, int expectedSize, int firstDimensionArrayIndex) -
ShouldHaveSize
-
ShouldHaveSize
- Throws:
IOException
-
-
Method Details
-
shouldHaveSize
public static ErrorMessageFactory shouldHaveSize(Object actual, int actualSize, int expectedSize, int firstDimensionArrayIndex) Creates a new.ShouldHaveSize- Parameters:
actual- the actual value in the failed assertion.actualSize- the size ofactual.expectedSize- the expected size.firstDimensionArrayIndex- Index of first dimension of array- Returns:
- the created
ErrorMessageFactory.
-
shouldHaveSize
Creates a new.ShouldHaveSize- Parameters:
actual- the actual value in the failed assertion.actualSize- the size ofactual.expectedSize- the expected size.- Returns:
- the created
ErrorMessageFactory.
-
shouldHaveSize
Creates a newfor file size.ShouldHaveSize- Parameters:
actual- the actual file in the failed assertion.expectedSize- the expected file size.- Returns:
- the created
ErrorMessageFactory.
-
shouldHaveSize
Creates a newfor Path file sizeShouldHaveSize- Parameters:
actual- The actual path file in the failed assertionexpectedSize- The expected size of the path file- Returns:
- the created
ErrorMessageFactory - Throws:
IOException- if an I/O error occurs
-