doc / ch.tutteli.atrium.api.fluent.en_GB.jdk8

Package ch.tutteli.atrium.api.fluent.en_GB.jdk8

Contains an API for types introduced with JDK 8

Properties

day

val <T : LocalDate> Expect<T>.day: Expect<Int>

Creates an Expect for the property LocalDate.dayOfMonth of the subject of the assertion, so that further fluent calls are assertions about it.

dayOfWeek

val <T : LocalDate> Expect<T>.dayOfWeek: Expect<DayOfWeek>

Creates an Expect for the property LocalDate.getDayOfWeek of the subject of the assertion, so that further fluent calls are assertions about it.

extension

val <T : Path> Expect<T>.extension: Expect<String>

Creates an Expect for the property Path.extension (provided via niok) of the subject of the assertion, so that further fluent calls are assertions about it.

fileName

val <T : Path> Expect<T>.fileName: Expect<String>

Creates an Expect for the property Path.fileNameAsString (provided via niok) of the subject of the assertion, so that further fluent calls are assertions about it.

fileNameWithoutExtension

val <T : Path> Expect<T>.fileNameWithoutExtension: Expect<String>

Creates an Expect for the property Path.fileNameWithoutExtension (provided via niok) of the subject of the assertion, so that further fluent calls are assertions about it.

month

val <T : LocalDate> Expect<T>.month: Expect<Int>

Creates an Expect for the property LocalDate.monthValue of the subject of the assertion, so that further fluent calls are assertions about it.

parent

val <T : Path> Expect<T>.parent: Expect<Path>

Expects that this Path has a parent and creates an Expect for it, so that further fluent calls are assertions about it.

year

val <T : LocalDate> Expect<T>.year: Expect<Int>

Creates an Expect for the property LocalDate.year of the subject of the assertion, so that further fluent calls are assertions about it.

Functions

asPath

fun <T : File> Expect<T>.asPath(): Expect<Path>

Turns Expect<File> into Expect<Path>.

fun <T : File> Expect<T>.asPath(assertionCreator: Expect<Path>.() -> Unit): Expect<T>

Expects that the subject of the assertion holds all assertions the given assertionCreator creates for the subject as Path.

day

fun <T : LocalDate> Expect<T>.day(assertionCreator: Expect<Int>.() -> Unit): Expect<T>

Expects that the property LocalDate.dayOfMonth of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns this assertion container.

dayOfWeek

fun <T : LocalDate> Expect<T>.dayOfWeek(assertionCreator: Expect<DayOfWeek>.() -> Unit): Expect<T>

Expects that the property LocalDate.getDayOfWeek of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns this assertion container.

endsNotWith

fun <T : Path> Expect<T>.endsNotWith(expected: Path): Expect<T>

Expects that the subject of the assertion (a Path) does not end with the expected Path;

endsWith

fun <T : Path> Expect<T>.endsWith(expected: Path): Expect<T>

Expects that the subject of the assertion (a Path) ends with the expected Path.

exists

fun <T : Path> Expect<T>.exists(): Expect<T>

Expects that the subject of the assertion (a Path) exists; meaning that there is a file system entry at the location the Path points to.

existsNot

fun <T : Path> Expect<T>.existsNot(): Expect<T>

Expects that the subject of the assertion (a Path) does not exist; meaning that there is no file system entry at the location the Path points to.

extension

fun <T : Path> Expect<T>.extension(assertionCreator: Expect<String>.() -> Unit): Expect<T>

Expects that the property Path.extension (provided via niok) of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns this assertion container.

fileName

fun <T : Path> Expect<T>.fileName(assertionCreator: Expect<String>.() -> Unit): Expect<T>

Expects that the property Path.fileNameAsString (provided via niok) of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns this assertion container.

fileNameWithoutExtension

fun <T : Path> Expect<T>.fileNameWithoutExtension(assertionCreator: Expect<String>.() -> Unit): Expect<T>

Expects that the property Path.fileNameWithoutExtension (provided via niok) of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns this assertion container.

isAfter

fun <T : ChronoLocalDate> Expect<T>.isAfter(expected: ChronoLocalDate): Expect<T>

Expects that the subject of the assertion (a ChronoLocalDate) is after the expected.

fun <T : ChronoLocalDateTime<out ChronoLocalDate>> Expect<T>.isAfter(expected: ChronoLocalDateTime<*>): Expect<T>

Expects that the subject of the assertion (a ChronoLocalDateTime) is after the expected.

fun <T : ChronoZonedDateTime<out ChronoLocalDate>> Expect<T>.isAfter(expected: ChronoZonedDateTime<*>): Expect<T>

Expects that the subject of the assertion (a ChronoZonedDateTime) is after the expected.

isAfterOrEqual

fun <T : ChronoLocalDate> Expect<T>.isAfterOrEqual(expected: ChronoLocalDate): Expect<T>

Expects that the subject of the assertion (a ChronoLocalDate) is after or equal the expected.

fun <T : ChronoLocalDateTime<out ChronoLocalDate>> Expect<T>.isAfterOrEqual(expected: ChronoLocalDateTime<*>): Expect<T>

Expects that the subject of the assertion (a ChronoLocalDateTime) is after or equal the expected.

fun <T : ChronoZonedDateTime<out ChronoLocalDate>> Expect<T>.isAfterOrEqual(expected: ChronoZonedDateTime<*>): Expect<T>

Expects that the subject of the assertion (a ChronoZonedDateTime) is after or equal the expected.

isBefore

fun <T : ChronoLocalDate> Expect<T>.isBefore(expected: ChronoLocalDate): Expect<T>

Expects that the subject of the assertion (a ChronoLocalDate) is before the expected.

fun <T : ChronoLocalDateTime<out ChronoLocalDate>> Expect<T>.isBefore(expected: ChronoLocalDateTime<*>): Expect<T>

Expects that the subject of the assertion (a ChronoLocalDateTime) is before the expected.

fun <T : ChronoZonedDateTime<out ChronoLocalDate>> Expect<T>.isBefore(expected: ChronoZonedDateTime<*>): Expect<T>

Expects that the subject of the assertion (a ChronoZonedDateTime) is before the expected.

isBeforeOrEqual

fun <T : ChronoLocalDate> Expect<T>.isBeforeOrEqual(expected: ChronoLocalDate): Expect<T>

Expects that the subject of the assertion (a ChronoLocalDate) is before or equal the expected.

fun <T : ChronoLocalDateTime<out ChronoLocalDate>> Expect<T>.isBeforeOrEqual(expected: ChronoLocalDateTime<*>): Expect<T>

Expects that the subject of the assertion (a ChronoLocalDateTime) is before or equal the expected.

fun <T : ChronoZonedDateTime<out ChronoLocalDate>> Expect<T>.isBeforeOrEqual(expected: ChronoZonedDateTime<*>): Expect<T>

Expects that the subject of the assertion (a ChronoZonedDateTime) is before or equals the expected.

isDirectory

fun <T : Path> Expect<T>.isDirectory(): Expect<T>

Expects that the subject of the assertion (a Path) is a directory; meaning that there is a file system entry at the location the Path points to and that is a directory.

isEmpty

fun <T : Optional<*>> Expect<T>.isEmpty(): Expect<T>

Expects that the subject of the assertion (an Optional) is empty (not present).

isEqual

fun <T : ChronoLocalDate> Expect<T>.isEqual(expected: ChronoLocalDate): Expect<T>

Expects that the subject of the assertion (a ChronoLocalDate) is equal to the expected.

fun <T : ChronoLocalDateTime<out ChronoLocalDate>> Expect<T>.isEqual(expected: ChronoLocalDateTime<*>): Expect<T>

Expects that the subject of the assertion (a ChronoLocalDateTime) is equal to the expected.

fun <T : ChronoZonedDateTime<out ChronoLocalDate>> Expect<T>.isEqual(expected: ChronoZonedDateTime<*>): Expect<T>

Expects that the subject of the assertion (a ChronoZonedDateTime) is equal to the expected.

isPresent

fun <E, T : Optional<E>> Expect<T>.isPresent(): Expect<E>

Expects that the subject of the assertion (an Optional) is present and returns an Expect for the inner type E.

fun <E, T : Optional<E>> Expect<T>.isPresent(assertionCreator: Expect<E>.() -> Unit): Expect<T>

Expects that the subject of the assertion (an Optional) is present and that it holds all assertions the given assertionCreator creates.

isReadable

fun <T : Path> Expect<T>.isReadable(): Expect<T>

Expects that the subject of the assertion (a Path) is readable; meaning that there is a file system entry at the location the Path points to and that the current thread has the permission to read from it.

isRegularFile

fun <T : Path> Expect<T>.isRegularFile(): Expect<T>

Expects that the subject of the assertion (a Path) is a file; meaning that there is a file system entry at the location the Path points to and that is a regular file.

isWritable

fun <T : Path> Expect<T>.isWritable(): Expect<T>

Expects that the subject of the assertion (a Path) is writable; meaning that there is a file system entry at the location the Path points to and that the current thread has the permission to write to it.

month

fun <T : LocalDate> Expect<T>.month(assertionCreator: Expect<Int>.() -> Unit): Expect<T>

Expects that the property LocalDate.monthValue of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns this assertion container.

parent

fun <T : Path> Expect<T>.parent(assertionCreator: Expect<Path>.() -> Unit): Expect<T>

Expects that this Path has a parent and that the parent holds all assertions the given assertionCreator creates for it and returns this assertion container.

startsNotWith

fun <T : Path> Expect<T>.startsNotWith(expected: Path): Expect<T>

Expects that the subject of the assertion (a Path) does not start with the expected.

startsWith

fun <T : Path> Expect<T>.startsWith(expected: Path): Expect<T>

Expects that the subject of the assertion (a Path) starts with the expected.

year

fun <T : LocalDate> Expect<T>.year(assertionCreator: Expect<Int>.() -> Unit): Expect<T>

Expects that the property LocalDate.yearof the subject of the assertion holds all assertions the given assertionCreator creates for it and returns this assertion container.