Class AbstractFileSizeAssert<SELF extends AbstractFileAssert<SELF>>
java.lang.Object
org.assertj.core.api.AbstractAssert<AbstractFileSizeAssert<SELF>, Long>
org.assertj.core.api.AbstractObjectAssert<AbstractFileSizeAssert<SELF>, Long>
org.assertj.core.api.AbstractComparableAssert<AbstractFileSizeAssert<SELF>, Long>
org.assertj.core.api.AbstractLongAssert<AbstractFileSizeAssert<SELF>>
org.assertj.core.api.AbstractFileSizeAssert<SELF>
- All Implemented Interfaces:
Assert<AbstractFileSizeAssert<SELF>, Long>, ComparableAssert<AbstractFileSizeAssert<SELF>, Long>, Descriptable<AbstractFileSizeAssert<SELF>>, ExtensionPoints<AbstractFileSizeAssert<SELF>, Long>, NumberAssert<AbstractFileSizeAssert<SELF>, Long>
- Direct Known Subclasses:
FileSizeAssert
public abstract class AbstractFileSizeAssert<SELF extends AbstractFileAssert<SELF>>
extends AbstractLongAssert<AbstractFileSizeAssert<SELF>>
Base class for file size assertions.
- Since:
- 3.22.0
-
Field Summary
Fields inherited from class AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractFileSizeAssert(Long actualFileSize, Class<?> selfType) -
Method Summary
Modifier and TypeMethodDescriptionabstract AbstractFileAssert<SELF> Returns to the file on which we ran size assertions on.Methods inherited from class AbstractLongAssert
isBetween, isCloseTo, isCloseTo, isCloseTo, isCloseTo, isEqualTo, isEven, isGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualTo, isNegative, isNotCloseTo, isNotCloseTo, isNotCloseTo, isNotCloseTo, isNotEqualTo, isNotNegative, isNotPositive, isNotZero, isOdd, isOne, isPositive, isStrictlyBetween, isZero, usingComparator, usingComparator, usingDefaultComparatorMethods inherited from class AbstractComparableAssert
inBinary, inHexadecimal, isEqualByComparingTo, isGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualTo, isNotEqualByComparingToMethods inherited from class AbstractObjectAssert
as, as, doesNotReturn, extracting, extracting, extracting, extracting, extracting, extracting, extractingForProxy, getComparatorsByType, hasAllNullFieldsOrProperties, hasAllNullFieldsOrPropertiesExcept, hasFieldOrProperty, hasFieldOrPropertyWithValue, hasNoNullFieldsOrProperties, hasNoNullFieldsOrPropertiesExcept, hasOnlyFields, isEqualToComparingFieldByField, isEqualToComparingFieldByFieldRecursively, isEqualToComparingOnlyGivenFields, isEqualToIgnoringGivenFields, isEqualToIgnoringNullFields, newObjectAssert, returns, usingComparatorForFields, usingComparatorForType, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparisonMethods inherited from class AbstractAssert
actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingEquals, usingEquals, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Descriptable
as, describedAs, describedAs
-
Constructor Details
-
AbstractFileSizeAssert
-
-
Method Details
-
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:
- file assertions.
-