Top Fields Constructors Methods
org.assertj.core.api

public Class FileSizeAssert<T>

extends AbstractFileSizeAssert<FileAssert>
Class Inheritance
Imports
org.assertj.core.util.CheckReturnValue

Field Summary

Modifier and TypeField and Description
private AbstractFileAssert<FileAssert>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public AbstractFileAssert<FileAssert>
returnToFile()

Implements abstract org.assertj.core.api.AbstractFileSizeAssert.returnToFile.

Returns to the file on which we ran size assertions on.

Field Detail

fileAssertback to summary
private AbstractFileAssert<FileAssert> fileAssert

Constructor Detail

FileSizeAssertback to summary
public FileSizeAssert(AbstractFileAssert<FileAssert> fileAssert)

Method Detail

returnToFileback to summary
public AbstractFileAssert<FileAssert> returnToFile()

Implements abstract org.assertj.core.api.AbstractFileSizeAssert.returnToFile.

Doc from org.assertj.core.api.AbstractFileSizeAssert.returnToFile.

Returns to the file on which we ran size assertions on.

Example:

 File file = File.createTempFile("tmp", "bin");
Files.write(file.toPath(), new byte[] {1, 1});

assertThat(file).size().isGreaterThan(1L).isLessThan(5L)
                .returnToFile().hasBinaryContent(new byte[] {1, 1});
Returns:AbstractFileAssert<FileAssert>

file assertions.

Annotations
@Override
@CheckReturnValue