Package org.assertj.core.error
Class ShouldHaveSize
- java.lang.Object
-
- org.assertj.core.error.BasicErrorMessageFactory
-
- org.assertj.core.error.ShouldHaveSize
-
- All Implemented Interfaces:
ErrorMessageFactory
public class ShouldHaveSize extends BasicErrorMessageFactory
Creates an error message indicating that an assertion that verifies that a value have certain size failed.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringSHOULD_HAVE_FILE_SIZEprivate static java.lang.StringSHOULD_HAVE_PATH_SIZE-
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format, formatter
-
-
Constructor Summary
Constructors Modifier Constructor Description privateShouldHaveSize(java.io.File actual, long expectedSize)privateShouldHaveSize(java.lang.Object actual, int actualSize, int expectedSize)privateShouldHaveSize(java.lang.Object actual, int actualSize, int expectedSize, int firstDimensionArrayIndex)privateShouldHaveSize(java.nio.file.Path actual, long expectedSize)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ErrorMessageFactoryshouldHaveSize(java.io.File actual, long expectedSize)Creates a newfor file size.ShouldHaveSizestatic ErrorMessageFactoryshouldHaveSize(java.lang.Object actual, int actualSize, int expectedSize)Creates a new.ShouldHaveSizestatic ErrorMessageFactoryshouldHaveSize(java.lang.Object actual, int actualSize, int expectedSize, int firstDimensionArrayIndex)Creates a new.ShouldHaveSizestatic ErrorMessageFactoryshouldHaveSize(java.nio.file.Path actual, long expectedSize)Creates a newfor Path file sizeShouldHaveSize-
Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
-
-
-
Field Detail
-
SHOULD_HAVE_FILE_SIZE
private static final java.lang.String SHOULD_HAVE_FILE_SIZE
- See Also:
- Constant Field Values
-
SHOULD_HAVE_PATH_SIZE
private static final java.lang.String SHOULD_HAVE_PATH_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ShouldHaveSize
private ShouldHaveSize(java.lang.Object actual, int actualSize, int expectedSize)
-
ShouldHaveSize
private ShouldHaveSize(java.lang.Object actual, int actualSize, int expectedSize, int firstDimensionArrayIndex)
-
ShouldHaveSize
private ShouldHaveSize(java.io.File actual, long expectedSize)
-
ShouldHaveSize
private ShouldHaveSize(java.nio.file.Path actual, long expectedSize) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
shouldHaveSize
public static ErrorMessageFactory shouldHaveSize(java.lang.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
public static ErrorMessageFactory shouldHaveSize(java.lang.Object actual, int actualSize, int expectedSize)
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
public static ErrorMessageFactory shouldHaveSize(java.io.File actual, long expectedSize)
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
public static ErrorMessageFactory shouldHaveSize(java.nio.file.Path actual, long expectedSize) throws java.io.IOException
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:
java.io.IOException- if an I/O error occurs
-
-