Class AbstractJavaFileObjectAssert<I extends AbstractJavaFileObjectAssert<I,A>,A extends JavaFileObject>
java.lang.Object
org.assertj.core.api.AbstractAssert<I,A>
io.github.ascopes.jct.assertions.AbstractJavaFileObjectAssert<I,A>
- Type Parameters:
I
- the implementation class that is extending this class.A
- the file object implementation type.
- All Implemented Interfaces:
Assert<I,
,A> Descriptable<I>
,ExtensionPoints<I,
A>
- Direct Known Subclasses:
JavaFileObjectAssert
,PathFileObjectAssert
public abstract class AbstractJavaFileObjectAssert<I extends AbstractJavaFileObjectAssert<I,A>,A extends JavaFileObject>
extends AbstractAssert<I,A>
Abstract assertions for
Java file objects
.- Since:
- 0.0.1
- Author:
- Ashley Scopes
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractJavaFileObjectAssert
(@Nullable A actual, Class<?> selfType) Initialize this assertion. -
Method Summary
Modifier and TypeMethodDescriptionGet an assertion object on the binary content of the file.content()
Get an assertion object on the content of the file, usingUTF-8
encoding.Get an assertion object on the content of the file.content
(CharsetDecoder charsetDecoder) Get an assertion object on the content of the file.kind()
Perform an assertion on the file object kind.Get an assertion object on the last modified timestamp.name()
Get an assertion object on the name of the file.uri()
Get an assertion object on the URI of the file.Methods inherited from class org.assertj.core.api.AbstractAssert
areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, 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, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Constructor Details
-
AbstractJavaFileObjectAssert
Initialize this assertion.- Parameters:
actual
- the actual value to assert on.selfType
- the type of the assertion implementation.
-
-
Method Details
-
uri
Get an assertion object on the URI of the file.- Returns:
- the URI assertion.
- Throws:
AssertionError
- if the actual value is null.
-
name
Get an assertion object on the name of the file.- Returns:
- the string assertion.
- Throws:
AssertionError
- if the actual value is null.
-
binaryContent
Get an assertion object on the binary content of the file.- Returns:
- the byte array assertion.
- Throws:
AssertionError
- if the actual value is null.
-
content
Get an assertion object on the content of the file, usingUTF-8
encoding.- Returns:
- the string assertion.
- Throws:
AssertionError
- if the actual value is null.UncheckedIOException
- if an IO error occurs reading the file content.
-
content
Get an assertion object on the content of the file.- Parameters:
charset
- the charset to decode the file with.- Returns:
- the string assertion.
- Throws:
AssertionError
- if the actual value is null.NullPointerException
- if the charset parameter is null.UncheckedIOException
- if an IO error occurs reading the file content.
-
content
Get an assertion object on the content of the file.- Parameters:
charsetDecoder
- the charset decoder to use to decode the file to a string.- Returns:
- the string assertion.
- Throws:
AssertionError
- if the actual value is null.NullPointerException
- if the charset decoder parameter is null.UncheckedIOException
- if an IO error occurs reading the file content.
-
lastModified
Get an assertion object on the last modified timestamp.This will be set to the UNIX epoch (
1970-01-01T00:00:00.000Z
) if an error occurs reading the file modification time, or if the information is not available.- Returns:
- the instant assertion.
- Throws:
AssertionError
- if the actual value is null.
-
kind
Perform an assertion on the file object kind.- Returns:
- the assertions for the kind.
- Throws:
AssertionError
- if the actual value is null.
-