Top Description Fields Constructors Methods
org.assertj.core.error

public Class ShouldHaveSize

extends BasicErrorMessageFactory
Class Inheritance
Static Imports
java.lang.String.format

Creates an error message indicating that an assertion that verifies that a value have certain size failed.
Author
Alex Ruiz

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
Inherited from org.assertj.core.error.BasicErrorMessageFactory:
argumentsformatformatter

Constructor Summary

AccessConstructor and Description
private
ShouldHaveSize(Object actual, int actualSize, int expectedSize)

private
ShouldHaveSize(Object actual, int actualSize, int expectedSize, int firstDimensionArrayIndex)

private
ShouldHaveSize(File actual, long expectedSize)

private
ShouldHaveSize(Path actual, long expectedSize)

Method Summary

Modifier and TypeMethod and Description
public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldHaveSize
(Object
the actual value in the failed assertion.
actual
,
int
the size of actual.
actualSize
,
int
the expected size.
expectedSize
,
int
Index of first dimension of array
firstDimensionArrayIndex
)

Creates a new ShouldHaveSize.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldHaveSize
(Object
the actual value in the failed assertion.
actual
,
int
the size of actual.
actualSize
,
int
the expected size.
expectedSize
)

Creates a new ShouldHaveSize.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldHaveSize
(File
the actual file in the failed assertion.
actual
,
long
the expected file size.
expectedSize
)

Creates a new ShouldHaveSize for file size.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory
shouldHaveSize
(Path
The actual path file in the failed assertion
actual
,
long
The expected size of the path file
expectedSize
)

Creates a new ShouldHaveSize for Path file size

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
createcreatecreateequalshashCodetoStringunquotedString

Field Detail

SHOULD_HAVE_FILE_SIZEback to summary
private static final String SHOULD_HAVE_FILE_SIZE
SHOULD_HAVE_PATH_SIZEback to summary
private static final String SHOULD_HAVE_PATH_SIZE

Constructor Detail

ShouldHaveSizeback to summary
private ShouldHaveSize(Object actual, int actualSize, int expectedSize)
ShouldHaveSizeback to summary
private ShouldHaveSize(Object actual, int actualSize, int expectedSize, int firstDimensionArrayIndex)
ShouldHaveSizeback to summary
private ShouldHaveSize(File actual, long expectedSize)
ShouldHaveSizeback to summary
private ShouldHaveSize(Path actual, long expectedSize) throws IOException

Method Detail

shouldHaveSizeback to summary
public static ErrorMessageFactory shouldHaveSize(Object actual, int actualSize, int expectedSize, int firstDimensionArrayIndex)

Creates a new ShouldHaveSize.

Parameters
actual:Object

the actual value in the failed assertion.

actualSize:int

the size of actual.

expectedSize:int

the expected size.

firstDimensionArrayIndex:int

Index of first dimension of array

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldHaveSizeback to summary
public static ErrorMessageFactory shouldHaveSize(Object actual, int actualSize, int expectedSize)

Creates a new ShouldHaveSize.

Parameters
actual:Object

the actual value in the failed assertion.

actualSize:int

the size of actual.

expectedSize:int

the expected size.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldHaveSizeback to summary
public static ErrorMessageFactory shouldHaveSize(File actual, long expectedSize)

Creates a new ShouldHaveSize for file size.

Parameters
actual:File

the actual file in the failed assertion.

expectedSize:long

the expected file size.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldHaveSizeback to summary
public static ErrorMessageFactory shouldHaveSize(Path actual, long expectedSize) throws IOException

Creates a new ShouldHaveSize for Path file size

Parameters
actual:Path

The actual path file in the failed assertion

expectedSize:long

The expected size of the path file

Returns:ErrorMessageFactory

the created ErrorMessageFactory

Exceptions
IOException:
if an I/O error occurs