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.- Author:
- Alex Ruiz
-
-
Field Summary
Fields Modifier and Type Field Description private static String
SHOULD_HAVE_FILE_SIZE
-
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format, formatter
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ShouldHaveSize(File actual, long expectedSize)
private
ShouldHaveSize(Object actual, int actualSize, int expectedSize)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ErrorMessageFactory
shouldHaveSize(File actual, long expectedSize)
Creates a new
for file size.ShouldHaveSize
static ErrorMessageFactory
shouldHaveSize(Object actual, int actualSize, int expectedSize)
Creates a new
.ShouldHaveSize
-
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 String SHOULD_HAVE_FILE_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
shouldHaveSize
public static ErrorMessageFactory shouldHaveSize(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(File actual, long expectedSize)
Creates a new
for file size.ShouldHaveSize
- Parameters:
actual
- the actual file in the failed assertion.expectedSize
- the expected file size.- Returns:
- the created
ErrorMessageFactory
.
-
-