Package-level declarations

Contains the API which provides a pure fluent API in English and which has its design focus on usability in conjunction with code completion.

Contains the API which provides a pure fluent API in English and which has its design focus on usability in conjunction with code completion.

Types

Link copied to clipboard
class Entries<T : Any>(val assertionCreatorOrNull: Expect<T>.() -> Unit?, val otherAssertionCreatorsOrNulls: Expect<T>.() -> Unit?) : Group<Expect<T>.() -> Unit?> , VarArgHelper<Expect<T>.() -> Unit?>

Parameter object to express a Group of identification lambdas.

Link copied to clipboard
class Entry<T : Any>(val assertionCreatorOrNull: Expect<T>.() -> Unit?) : Group<Expect<T>.() -> Unit?>

Parameter object to express a Group with a single identification lambda.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class ExperimentalWithOptions
Link copied to clipboard
data class KeyValue<out K, V : Any>(val key: K, val valueAssertionCreatorOrNull: Expect<V>.() -> Unit?)

Parameter object to express a key/value Pair whose value type is a nullable lambda with an Expect receiver, which means one can either pass a lambda or null.

Link copied to clipboard
data class Value<out T>(val expected: T) : Group<T>

Represents a Group with a single value.

Link copied to clipboard
class Values<out T>(val expected: T, val otherExpected: T) : Group<T> , VarArgHelper<T>

Represents a Group of multiple values.

Properties

Link copied to clipboard
val <T> Expect<T>.and: Expect<T>

Can be used to separate single assertions.

Link copied to clipboard

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

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

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

Link copied to clipboard

Creates an Expect for the property LocalDateTime.dayOfWeek of the subject of this expectation, so that further fluent calls are assertions about it.

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

Creates an Expect for the property ZonedDatetime.dayOfWeek of the subject of this expectation, so that further fluent calls are assertions about it.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
val <K, T : Pair<K, *>> Expect<T>.first: Expect<K>

Creates an Expect for the property Pair.first of the subject of this expectation, so that further fluent calls are assertions about it.

Link copied to clipboard

Defines that the IterableLike contains in order only groups of entries whereas the order within the group is specified as next step.

Link copied to clipboard

Defines that the v behaviour ignore case shall be applied to this sophisticated contains assertion.

Defines that the search behaviour ignore case shall be applied to this sophisticated contains not assertion.

Link copied to clipboard

Defines that the search behaviour "find entries in any order in the IterableLike" shall be applied to this sophisticated to contain in IterableLike expectation.

Defines that the search behaviour "find entries in any order in the MapLike" shall be applied to this sophisticated to contain in MapLike expectation.

Link copied to clipboard

Defines that the search behaviour "find entries in order in the IterableLike" shall be applied to this sophisticated to contain in IterableLike expectation.

Defines that the search behaviour "find entries in order in the MapLike" shall be applied to this sophisticated to contain in MapLike expectation.

Link copied to clipboard
val <K, T : Map.Entry<K, *>> Expect<T>.key: Expect<K>

Creates an Expect for the property Map.Entry.key of the subject of this expectation, so that further fluent calls are assertions about it.

Link copied to clipboard
val <K, T : Map<out K, *>> Expect<T>.keys: Expect<Set<K>>

Creates an Expect for the property Map.keys of the subject of this expectation, so that further fluent calls are assertions about it.

Link copied to clipboard

Expects that Iterable is not empty and returns an Expect for the last element in it.

Link copied to clipboard

Expects that the property Throwable.message of the subject of this expectation is not null, creates an Expect for it and returns it.

Link copied to clipboard

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

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

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

Link copied to clipboard

Starts a sophisticated noToContain assertion building process based on this Expect and already chooses a NotCheckerStep.

Starts a sophisticated toContain assertion building process based on this Expect and already chooses a NotCheckerStep.

Link copied to clipboard

Defines that the constraint "only the specified entries exist in the IterableLike" shall be applied to this sophisticated to contain in IterableLike expectation.

Defines that the constraint "only the specified entries exist in the IterableLike" shall be applied to this sophisticated to contain in order in IterableLike expectation.

Defines that the constraint "only the specified entries exist in the MapLike" shall be applied to this sophisticated to contain MapLike expectation.

Defines that the constraint "only the specified entries exist in the MapLike" shall be applied to this sophisticated to contain in order MapLike expectation.

Link copied to clipboard

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

Link copied to clipboard
val <V, T : Pair<*, V>> Expect<T>.second: Expect<V>

Creates an Expect for the property Pair.second of the subject of this expectation, so that further fluent calls are assertions about it.

Link copied to clipboard

Creates an Expect for the property Collection.size of the subject of this expectation, so that further fluent calls are assertions about it.

val <T : Map<*, *>> Expect<T>.size: Expect<Int>

Creates an Expect for the property Map.size of the subject of this expectation, so that further fluent calls are assertions about it.

Link copied to clipboard

Starts a sophisticated toContain assertion building process based on this Expect.

Starts a sophisticated toContain expectation building process based on this Expect.

Link copied to clipboard
val <V, T : Map.Entry<*, V>> Expect<T>.value: Expect<V>

Creates an Expect for the property Map.Entry.value of the subject of this expectation, so that further fluent calls are assertions about it.

Link copied to clipboard
val <V, T : Map<*, V>> Expect<T>.values: Expect<Collection<V>>

Creates an Expect for the property Map.values of the subject of this expectation, so that further fluent calls are assertions about it.

Link copied to clipboard

A filler word to emphasise that the next step defines the order within expected groups of values.

Link copied to clipboard

Creates an Expect for the property LocalDateTime.year[LocalDateTime.getYear of the subject of this expectation, so that further fluent calls are assertions about it.

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

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

Functions

Link copied to clipboard
infix fun <T> Expect<T>.and(assertionCreator: Expect<T>.() -> Unit): Expect<T>

Can be used to create a group of sub assertions when using the fluent API.

Link copied to clipboard
fun <K, V, T : Map<out K, V>> Expect<T>.asEntries(): Expect<Set<Map.Entry<K, V>>>

Turns Expect<Map<K, V>> into Expect<Set<Map.Entry<K, V>>>.

fun <K, V, T : Map<out K, V>> Expect<T>.asEntries(assertionCreator: Expect<Set<Map.Entry<K, V>>>.() -> Unit): Expect<T>

Turns Expect<Map<K, V>> into Expect<Set<Map.Entry<K, V>>> and expects that it holds all assertions the given assertionCreator creates for it.

Link copied to clipboard

Turns Expect<Sequence<E>> into Expect<Iterable<E>>.

fun <E, T : Sequence<E>> Expect<T>.asIterable(assertionCreator: Expect<Iterable<E>>.() -> Unit): Expect<T>

Expects that the subject of this expectation holds all assertions the given assertionCreator creates for the subject as Iterable.

Link copied to clipboard
fun <E, T : Iterable<E>> Expect<T>.asList(): Expect<List<E>>

Turns Expect<E, T : Iterable<E>> into Expect<List<E>.

fun <E, T : Sequence<E>> Expect<T>.asList(): Expect<List<E>>

Turns Expect<E, T : Sequence<E>> into Expect<List<E>.

fun <E> Expect<out Array<out E>>.asList(): Expect<List<E>>

Turns Expect<Array<E>> into Expect<List<E>>.

@JvmName(name = "boolArrAsList")
fun Expect<BooleanArray>.asList(): Expect<List<Boolean>>

Turns Expect<BooleanArray> into Expect<List<Boolean>>.

@JvmName(name = "byteArrAsList")
fun Expect<ByteArray>.asList(): Expect<List<Byte>>

Turns Expect<CharArray> into Expect<List<Byte>>.

@JvmName(name = "charArrAsList")
fun Expect<CharArray>.asList(): Expect<List<Char>>

Turns Expect<CharArray> into Expect<List<Char>>.

@JvmName(name = "doubleArrAsList")
fun Expect<DoubleArray>.asList(): Expect<List<Double>>

Turns Expect<DoubleArray> into Expect<List<Double>>.

@JvmName(name = "floatArrAsList")
fun Expect<FloatArray>.asList(): Expect<List<Float>>

Turns Expect<FloatArray> into Expect<List<Float>>.

@JvmName(name = "intArrAsList")
fun Expect<IntArray>.asList(): Expect<List<Int>>

Turns Expect<IntArray> into Expect<List<Int>>.

@JvmName(name = "longArrAsList")
fun Expect<LongArray>.asList(): Expect<List<Long>>

Turns Expect<LongArray> into Expect<List<Double>>.

@JvmName(name = "shortArrAsList")
fun Expect<ShortArray>.asList(): Expect<List<Short>>

Turns Expect<ShortArray> into Expect<List<Short>>.

fun <E, T : Iterable<E>> Expect<T>.asList(assertionCreator: Expect<List<E>>.() -> Unit): Expect<T>
fun <E, T : Sequence<E>> Expect<T>.asList(assertionCreator: Expect<List<E>>.() -> Unit): Expect<T>
@JvmName(name = "boolArrAsList")
fun Expect<BooleanArray>.asList(assertionCreator: Expect<List<Boolean>>.() -> Unit): Expect<BooleanArray>
@JvmName(name = "byteArrAsList")
fun Expect<ByteArray>.asList(assertionCreator: Expect<List<Byte>>.() -> Unit): Expect<ByteArray>
@JvmName(name = "charArrAsList")
fun Expect<CharArray>.asList(assertionCreator: Expect<List<Char>>.() -> Unit): Expect<CharArray>
@JvmName(name = "doubleArrAsList")
fun Expect<DoubleArray>.asList(assertionCreator: Expect<List<Double>>.() -> Unit): Expect<DoubleArray>
@JvmName(name = "floatArrAsList")
fun Expect<FloatArray>.asList(assertionCreator: Expect<List<Float>>.() -> Unit): Expect<FloatArray>
@JvmName(name = "intArrAsList")
fun Expect<IntArray>.asList(assertionCreator: Expect<List<Int>>.() -> Unit): Expect<IntArray>
@JvmName(name = "longArrAsList")
fun Expect<LongArray>.asList(assertionCreator: Expect<List<Long>>.() -> Unit): Expect<LongArray>
@JvmName(name = "shortArrAsList")
fun Expect<ShortArray>.asList(assertionCreator: Expect<List<Short>>.() -> Unit): Expect<ShortArray>

Expects that the subject of this expectation holds all assertions the given assertionCreator creates for the subject as List.

fun <E> Expect<Array<E>>.asList(assertionCreator: Expect<List<E>>.() -> Unit): Expect<Array<E>>
@JvmName(name = "asListEOut")
fun <E> Expect<Array<out E>>.asList(assertionCreator: Expect<List<E>>.() -> Unit): Expect<Array<out E>>

Expects that the subject of this expectation holds all assertions the given assertionCreator creates for the subject as List.

Link copied to clipboard

Turns Expect<Date> into Expect<LocalDate>.

fun <T : Date> Expect<T>.asLocalDate(assertionCreator: Expect<LocalDate>.() -> Unit): Expect<T>

Expects that the subject of this expectation holds all assertions the given assertionCreator creates for the subject asDate.

Link copied to clipboard

Turns Expect<Date> into Expect<LocalDateTime>.

fun <T : Date> Expect<T>.asLocalDateTime(assertionCreator: Expect<LocalDateTime>.() -> Unit): Expect<T>

Expects that the subject of this expectation holds all assertions the given assertionCreator creates for the subject asDate.

Link copied to clipboard
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 this expectation holds all assertions the given assertionCreator creates for the subject as Path.

Link copied to clipboard

Restricts a contains assertion by specifying that the number of occurrences of the value which we are looking for occurs at least number of times within the search input.

Restricts a contains assertion by specifying that the number of occurrences of the entry which we are looking for occurs at least number of times within the IterableLike.

Link copied to clipboard

Restricts a contains assertion by specifying that the number of occurrences of the value which we are looking for occurs at least once but at most number of times within the search input.

Restricts a contains assertion by specifying that the number of occurrences of the entry which we are looking for occurs at least once but at most number of times within the IterableLike.

Link copied to clipboard
fun <T> Expect<T>.because(reason: String, assertionCreator: Expect<T>.() -> Unit): Expect<T>

Allows to state a reason for one or multiple assertions for the current subject.

Link copied to clipboard

Restricts a contains at least assertion by specifying that the number of occurrences of the value which we are looking for occurs at most number of times within the search input.

Restricts a contains at least assertion by specifying that the number of occurrences of the entry which we are looking for occurs at most number of times within the IterableLike.

Link copied to clipboard

Expects that the property Throwable.cause of the subject is a ExpectedThrowableT or a subtype thereof, creates an Expect of the ExpectedThrowableT type for it and returns it.

inline fun <ExpectedThrowableT : Throwable> Expect<out Throwable>.cause(noinline assertionCreator: Expect<ExpectedThrowableT>.() -> Unit): Expect<ExpectedThrowableT>

Expects that the property Throwable.cause of the subject is a ExpectedThrowableT or a subtype thereof and holds all assertions the given assertionCreator creates for it.

Link copied to clipboard
fun Expect<LocalDateTime>.day(assertionCreator: Expect<Int>.() -> Unit): Expect<LocalDateTime>

Expects that the property LocalDateTime.dayOfMonth of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

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

Expects that the property LocalDate.dayOfMonth of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

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

Expects that the property ZonedDateTime.dayOfMonth of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Link copied to clipboard

Expects that the property LocalDateTime.dayOfWeekof the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

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

Expects that the property LocalDate.getDayOfWeek of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Expects that the property ZonedDatetime.dayOfWeek of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Link copied to clipboard
@JvmName(name = "elementsOfIgnoringCase")
fun <T : CharSequence> CharSequenceContains.CheckerStep<T, IgnoringCaseSearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T>
@JvmName(name = "elementsOfIgnoringCase")
fun <T : CharSequence> CharSequenceContains.EntryPointStep<T, IgnoringCaseSearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T>

Finishes the specification of the sophisticated to contain expectation where all elements of the expectedIterableLike shall be searched (ignoring case), using a non-disjoint search.

Finishes the specification of the sophisticated to contain expectation where all elements of the expectedIterableLike shall be searched, using a non-disjoint search.

Finishes the specification of the sophisticated to contain expectation where the subject (an IterableLike) needs to contain all elements of the expectedIterableLike where it does not matter in which order they appear.

Finishes the specification of the sophisticated to contain expectation where the subject (an IterableLike) needs to contain only and all elements of expectedIterableLike where it does not matter in which order.

Finishes the specification of the sophisticated to contain expectation where the subject (an IterableLike) needs to contain only and all elements of expectedIterableLike in the specified order.

Link copied to clipboard
fun <E : Any, T : IterableLike> IterableLikeContains.CheckerStep<out E?, T, InAnyOrderSearchBehaviour>.entries(assertionCreatorOrNull: Expect<E>.() -> Unit?, vararg otherAssertionCreatorsOrNulls: Expect<E>.() -> Unit?): Expect<T>

Finishes the specification of the sophisticated to contain expectation where the subject (an IterableLike) needs to contain an entry for assertionCreatorOrNull as well as for the otherAssertionCreatorsOrNulls where it does not matter in which order they appear -- an entry is contained if it either holds all assertions assertionCreatorOrNull creates or needs to be null in case assertionCreatorOrNull is defined as null.

fun <K, V, T : MapLike> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderOnlySearchBehaviour>.entries(keyValuePair: Pair<K, V>, vararg otherPairs: Pair<K, V>): Expect<T>

Finishes the specification of the sophisticated to contain expectation where the subject (a MapLike) needs to contain only the given keyValuePair as well as the otherPairs where it does not matter in which order they appear.

fun <K, V, T : MapLike> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderSearchBehaviour>.entries(keyValuePair: Pair<K, V>, vararg otherPairs: Pair<K, V>): Expect<T>

Finishes the specification of the sophisticated to contain expectation where the subject (a MapLike) needs to contain the given keyValuePair as well as the otherPairs where it does not matter in which order they appear.

inline fun <K, V : Any, T : MapLike> MapLikeContains.EntryPointStep<K, out V?, T, InAnyOrderOnlySearchBehaviour>.entries(keyValue: KeyValue<K, V>, vararg otherKeyValues: KeyValue<K, V>): Expect<T>

Finishes the specification of the sophisticated to contain expectation where the subject (a MapLike) needs to contain only the given keyValue as well as the otherKeyValues where it does not matter in which order they appear -- an entry is contained if it has a key as defined by keyValue's KeyValue.key and a corresponding value which either holds all assertions keyValue's KeyValue.valueAssertionCreatorOrNull creates or needs to be null in case KeyValue.valueAssertionCreatorOrNull is defined as null.

inline fun <K, V : Any, T : MapLike> MapLikeContains.EntryPointStep<K, out V?, T, InAnyOrderSearchBehaviour>.entries(keyValue: KeyValue<K, V>, vararg otherKeyValues: KeyValue<K, V>): Expect<T>

Finishes the specification of the sophisticated to contain expectation where the subject (a MapLike) needs to contain the given keyValue as well as the otherKeyValues where it does not matter in which order they appear -- an entry is contained if it has a key as defined by keyValue's KeyValue.key and a corresponding value which either holds all assertions keyValue's KeyValue.valueAssertionCreatorOrNull creates or needs to be null in case KeyValue.valueAssertionCreatorOrNull is defined as null.

fun <E : Any, T : IterableLike> IterableLikeContains.EntryPointStep<out E?, T, InAnyOrderOnlySearchBehaviour>.entries(assertionCreatorOrNull: Expect<E>.() -> Unit?, vararg otherAssertionCreatorsOrNulls: Expect<E>.() -> Unit?, report: InAnyOrderOnlyReportingOptions.() -> Unit = {}): Expect<T>

Finishes the specification of the sophisticated to contain expectation where the subject (an IterableLike) needs to contain only an entry for assertionCreatorOrNull as well as for the otherAssertionCreatorsOrNulls where it does not matter in which order they appear -- an entry is contained if it either holds all assertions assertionCreatorOrNull creates or needs to be null in case assertionCreatorOrNull is defined as null.

fun <E : Any, T : IterableLike> IterableLikeContains.EntryPointStep<out E?, T, InOrderOnlySearchBehaviour>.entries(assertionCreatorOrNull: Expect<E>.() -> Unit?, vararg otherAssertionCreatorsOrNulls: Expect<E>.() -> Unit?, report: InOrderOnlyReportingOptions.() -> Unit = {}): Expect<T>

Finishes the specification of the sophisticated to contain expectation where the subject (an IterableLike) needs to contain only an entry for assertionCreatorOrNull as well as for the otherAssertionCreatorsOrNulls in the specified order -- an entry is contained if it either holds all assertions assertionCreatorOrNull creates or needs to be null in case assertionCreatorOrNull is defined as null.

fun <K, V, T : MapLike> MapLikeContains.EntryPointStep<K, V, T, InOrderOnlySearchBehaviour>.entries(keyValuePair: Pair<K, V>, vararg otherPairs: Pair<K, V>, report: InOrderOnlyReportingOptions.() -> Unit = {}): Expect<T>

Finishes the specification of the sophisticated to contain expectation where the subject (a MapLike) needs to contain only the given keyValuePair as well as the otherPairs in the specified order.

inline fun <K, V : Any, T : MapLike> MapLikeContains.EntryPointStep<K, out V?, T, InOrderOnlySearchBehaviour>.entries(keyValue: KeyValue<K, V>, vararg otherKeyValues: KeyValue<K, V>, noinline report: InOrderOnlyReportingOptions.() -> Unit = {}): Expect<T>

Finishes the specification of the sophisticated to contain expectation where the subject (a MapLike) needs to contain only the given keyValue as well as the otherKeyValues in the specified order -- an entry is contained if it has a key as defined by keyValue's KeyValue.key and a corresponding value which either holds all assertions keyValue's KeyValue.valueAssertionCreatorOrNull creates or needs to be null in case KeyValue.valueAssertionCreatorOrNull is defined as null.

Link copied to clipboard

Finishes the specification of the sophisticated to contain expectation where the subject (a MapLike) needs to contain only and all entries of the given expectedMapLike where it does not matter in which order they appear.

Finishes the specification of the sophisticated to contain expectation where the subject (a MapLike) needs to contain all entries of the given expectedMapLike where it does not matter in which order they appear.

Finishes the specification of the sophisticated to contain expectation where the subject (a MapLike) needs to contain only and all entries of the given expectedMapLike in the specified order.

Link copied to clipboard
fun <E : Any, T : IterableLike> IterableLikeContains.CheckerStep<out E?, T, InAnyOrderSearchBehaviour>.entry(assertionCreatorOrNull: Expect<E>.() -> Unit?): Expect<T>

Finishes the specification of the sophisticated to contain expectation where the subject (an IterableLike) needs to contain an entry which either holds all assertions assertionCreatorOrNull creates or needs to be null in case assertionCreatorOrNull is defined as null.

Finishes the specification of the sophisticated to contain expectation where the subject (an IterableLike) needs to contain only one entry which holds all assertions created by the given assertionCreatorOrNull or is null in case assertionCreatorOrNull is defined as null.

Finishes the specification of the sophisticated to contain expectation where the subject (a MapLike) needs to contain exactly one entry where key and value have to equal the given keyValuePair.

Finishes the specification of the sophisticated to contain expectation where the subject (a MapLike) needs to contain the given keyValuePair.

Finishes the specification of the sophisticated to contain expectation where the subject (a MapLike) needs to contain exactly one entry with a key as defined by keyValue's KeyValue.key and a corresponding value which either holds all assertions keyValue's KeyValue.valueAssertionCreatorOrNull creates or needs to be null in case KeyValue.valueAssertionCreatorOrNull is defined as null.

Finishes the specification of the sophisticated to contain expectation where the subject (a MapLike) needs to contain an entry with a key as defined by keyValue's KeyValue.key and a corresponding value which either holds all assertions keyValue's KeyValue.valueAssertionCreatorOrNull creates or needs to be null in case KeyValue.valueAssertionCreatorOrNull is defined as null.

Link copied to clipboard

Restricts a contains assertion by specifying that the number of occurrences of the value which we are looking for occurs exactly number of times within the search input.

Restricts a contains assertion by specifying that the number of occurrences of the entry which we are looking for occurs exactly number of times within the IterableLike.

Link copied to clipboard
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 this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Link copied to clipboard
fun <T> Expect<T>.extractSubject(failureDescription: String? = null, assertionCreator: Expect<T>.(T) -> Unit): Expect<T>

Extracts the subject of this Expect in case it is defined and passes it to the given assertionCreator or adds a failing assertion to this Expect in case the subject is absent (e.g. due to a previous extraction failure).

Link copied to clipboard

Extracts a feature out of the current subject of this expectation, based on the given provider, creates a new Expect for it and returns it so that subsequent calls are based on the feature.

fun <T, R> Expect<T>.feature(f: (T) -> R): FeatureExpect<T, R>

Extracts the value which is returned when calling f on the current subject of this expectation, creates a new Expect for it and returns it so that subsequent calls are based on the feature.

fun <T, R> Expect<T>.feature(property: KProperty1<in T, R>): FeatureExpect<T, R>

Extracts the property out of the current subject of this expectation, creates a new Expect for it and returns it so that subsequent calls are based on the feature.

fun <T, R> Expect<T>.feature(provider: MetaFeatureOption<T>.(T) -> MetaFeature<R>, assertionCreator: Expect<R>.() -> Unit): Expect<T>

Extracts a feature out of the current subject of this expectation, based on the given provider, creates a new Expect for it, applies an expectation-group based on the given assertionCreator for the feature and returns the initial Expect with the current subject.

fun <T, R> Expect<T>.feature(description: String, provider: T.() -> R): FeatureExpect<T, R>

Extracts a feature out of the current subject of this expectation based on the given provider and using the given description, creates a new Expect for it and returns it so that subsequent calls are based on the feature.

fun <T, R> Expect<T>.feature(f: (T) -> R, assertionCreator: Expect<R>.() -> Unit): Expect<T>

Extracts the value which is returned when calling f on the current subject of this expectation, creates a new Expect for it, applies an expectation-group based on the given assertionCreator for the feature and returns the initial Expect with the current subject.

fun <T, A1, R> Expect<T>.feature(f: (T, A1) -> R, a1: A1): FeatureExpect<T, R>

Extracts the value which is returned when calling f with argument a1 on the current subject of this expectation, creates a new Expect for it and returns it so that subsequent calls are based on the feature.

fun <T, R> Expect<T>.feature(property: KProperty1<in T, R>, assertionCreator: Expect<R>.() -> Unit): Expect<T>

Extracts the property out of the current subject of this expectation, creates a new Expect for it, applies an expectation-group based on the given assertionCreator for the feature and returns the initial Expect with the current subject.

fun <T, R> Expect<T>.feature(description: String, provider: T.() -> R, assertionCreator: Expect<R>.() -> Unit): Expect<T>

Extracts a feature out of the current subject of this expectation based on the given provider and using the given description, creates a new Expect for it, applies an expectation-group based on the given assertionCreator for the feature and returns the initial Expect with the current subject.

fun <T, A1, R> Expect<T>.feature(f: (T, A1) -> R, a1: A1, assertionCreator: Expect<R>.() -> Unit): Expect<T>

Extracts the value which is returned when calling f with argument a1 on the current subject of this expectation, creates a new Expect for it, applies an expectation-group based on the given assertionCreator for the feature and returns the initial Expect with the current subject.

fun <T, A1, A2, R> Expect<T>.feature(f: (T, A1, A2) -> R, a1: A1, a2: A2): FeatureExpect<T, R>

Extracts the value which is returned when calling f with arguments a1, a2 on the current subject of this expectation, creates a new Expect for it and returns it so that subsequent calls are based on the feature.

fun <T, A1, A2, R> Expect<T>.feature(f: (T, A1, A2) -> R, a1: A1, a2: A2, assertionCreator: Expect<R>.() -> Unit): Expect<T>

Extracts the value which is returned when calling f with argument a1, a2 on the current subject of this expectation, creates a new Expect for it, applies an expectation-group based on the given assertionCreator for the feature and returns the initial Expect with the current subject.

fun <T, A1, A2, A3, R> Expect<T>.feature(f: (T, A1, A2, A3) -> R, a1: A1, a2: A2, a3: A3): FeatureExpect<T, R>

Extracts the value which is returned when calling f with arguments a1, a2, a3 on the current subject of this expectation, creates a new Expect for it and returns it so that subsequent calls are based on the feature.

fun <T, A1, A2, A3, R> Expect<T>.feature(f: (T, A1, A2, A3) -> R, a1: A1, a2: A2, a3: A3, assertionCreator: Expect<R>.() -> Unit): Expect<T>

Extracts the value which is returned when calling f with argument a1, a2, a3 on the current subject of this expectation, creates a new Expect for it, applies an expectation-group based on the given assertionCreator for the feature and returns the initial Expect with the current subject.

fun <T, A1, A2, A3, A4, R> Expect<T>.feature(f: (T, A1, A2, A3, A4) -> R, a1: A1, a2: A2, a3: A3, a4: A4): FeatureExpect<T, R>

Extracts the value which is returned when calling f with arguments a1, a2, a3, a4 on the current subject of this expectation, creates a new Expect for it and returns it so that subsequent calls are based on the feature.

fun <T, A1, A2, A3, A4, R> Expect<T>.feature(f: (T, A1, A2, A3, A4) -> R, a1: A1, a2: A2, a3: A3, a4: A4, assertionCreator: Expect<R>.() -> Unit): Expect<T>

Extracts the value which is returned when calling f with argument a1, a2, a3, a4 on the current subject of this expectation, creates a new Expect for it, applies an expectation-group based on the given assertionCreator for the feature and returns the initial Expect with the current subject.

fun <T, A1, A2, A3, A4, A5, R> Expect<T>.feature(f: (T, A1, A2, A3, A4, A5) -> R, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): FeatureExpect<T, R>

Extracts the value which is returned when calling f with arguments a1, a2, a3, a4, a5 on the current subject of this expectation, creates a new Expect for it and returns it so that subsequent calls are based on the feature.

fun <T, A1, A2, A3, A4, A5, R> Expect<T>.feature(f: (T, A1, A2, A3, A4, A5) -> R, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, assertionCreator: Expect<R>.() -> Unit): Expect<T>

Extracts the value which is returned when calling f with argument a1, a2, a3, a4, a5 on the current subject of this expectation, creates a new Expect for it, applies an expectation-group based on the given assertionCreator for the feature and returns the initial Expect with the current subject.

Link copied to clipboard
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 this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Link copied to clipboard
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 this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Link copied to clipboard
fun <K, V, T : Pair<K, V>> Expect<T>.first(assertionCreator: Expect<K>.() -> Unit): Expect<T>

Expects that the property Pair.first of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Link copied to clipboard
fun <E, T : List<E>> Expect<T>.get(index: Int): Expect<E>

Expects that the given index is within the bounds of the subject of this expectation (a List) and returns an Expect for the element at that position.

fun <E, T : List<E>> Expect<T>.get(index: Int, assertionCreator: Expect<E>.() -> Unit): Expect<T>

Expects that the given index is within the bounds of the subject of this expectation (a List) and that the element at that position holds all assertions the given assertionCreator creates for it.

Link copied to clipboard
fun <K, V, T : Map<out K, V>> Expect<T>.getExisting(key: K): Expect<V>

Expects that the subject of this expectation (a Map) contains the given key, creates an Expect for the corresponding value and returns the newly created Expect, so that further fluent calls are expectations about it.

fun <K, V, T : Map<out K, V>> Expect<T>.getExisting(key: K, assertionCreator: Expect<V>.() -> Unit): Expect<T>

Expects that the subject of this expectation (a Map) contains the given key and that the corresponding value holds all assertions the given assertionCreator creates for it.

Link copied to clipboard
fun ExpectGrouping.group(description: String, representationProvider: () -> Any? = Text.EMPTY_PROVIDER, groupingActions: ExpectGrouping.() -> Unit): ExpectGrouping

Creates and appends a group based on the given description (optionally representationProvider) and groupingActions and returns an ExpectGrouping.

fun <T> Expect<T>.group(description: String, representationProvider: () -> Any? = Text.EMPTY_PROVIDER, assertionCreator: Expect<T>.() -> Unit): Expect<T>

Creates and appends a group based on the given description (optionally representationProvider) and assertionCreator and returns an Expect.

Link copied to clipboard
fun <E, T : IterableLike> IterableLikeContains.EntryPointStep<E, T, InOrderOnlyGroupedWithinSearchBehaviour>.inAnyOrder(firstGroup: Group<E>, secondGroup: Group<E>, vararg otherExpectedGroups: Group<E>, report: InOrderOnlyReportingOptions.() -> Unit = {}, reportInGroup: InAnyOrderOnlyReportingOptions.() -> Unit = {}): Expect<T>

Finishes the specification of the sophisticated to contain expectation where the expected firstGroup as well as the secondGroup and optionally otherExpectedGroups of values need to be contained in IterableLike as only elements and in the specified order whereas the values within the groups can occur in any order.

@JvmName(name = "inAnyOrderEntries")
fun <E : Any, T : IterableLike> IterableLikeContains.EntryPointStep<out E?, T, InOrderOnlyGroupedWithinSearchBehaviour>.inAnyOrder(firstGroup: Group<Expect<E>.() -> Unit?>, secondGroup: Group<Expect<E>.() -> Unit?>, vararg otherExpectedGroups: Group<Expect<E>.() -> Unit?>, report: InOrderOnlyReportingOptions.() -> Unit = {}, reportInGroup: InAnyOrderOnlyReportingOptions.() -> Unit = {}): Expect<T>

Finishes the specification of the sophisticated to contain expectation where the expected firstGroup as well as the secondGroup and optionally otherExpectedGroups of identification lambdas, identifying an entry, need to be contained in IterableLike as only elements and in the specified order whereas the identification lambdas within the groups can occur in any order.

Link copied to clipboard
fun <T, R> Expect<T>.its(extractor: T.() -> R): FeatureExpect<T, R>

Extracts a feature out of the current subject of this expectation with the help of the given extractor, creates a new Expect for it and returns it so that subsequent calls are based on the feature.

fun <T, R> Expect<T>.its(extractor: T.() -> R, assertionCreator: Expect<R>.() -> Unit): Expect<T>

Extracts a feature out of the current subject of this expectation with the help of the given extractor, creates a new Expect for it, applies an expectation-group based on the given assertionCreator for the feature and returns the initial Expect with the current subject.

Link copied to clipboard
fun <K, V, T : Map.Entry<K, V>> Expect<T>.key(assertionCreator: Expect<K>.() -> Unit): Expect<T>

Expects that the property Map.Entry.key of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Link copied to clipboard
fun <K, V, T : Map<out K, V>> Expect<T>.keys(assertionCreator: Expect<Set<K>>.() -> Unit): Expect<T>

Expects that the property Map.keys of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Link copied to clipboard
fun <E : Comparable<E>, T : Iterable<E>> Expect<T>.last(assertionCreator: Expect<E>.() -> Unit): Expect<T>

Expects that the subject of this expectation (an Iterable) is not empty and that the last element in it holds all assertions the given assertionCreator creates for it.

Link copied to clipboard

Finishes the specification of the sophisticated to contain expectation where the given Regex as well as the otherPatterns are expected to have a match, using a non-disjoint search.

Link copied to clipboard
fun <E : Comparable<E>, T : Iterable<E>> Expect<T>.max(): Expect<E>

Creates an Expect for the result of calling max() on the subject of this expectation, so that further fluent calls are assertions about it.

fun <E : Comparable<E>, T : Iterable<E>> Expect<T>.max(assertionCreator: Expect<E>.() -> Unit): Expect<T>

Expects that the result of calling max() on the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Link copied to clipboard
fun <T : Throwable> Expect<T>.message(assertionCreator: Expect<String>.() -> Unit): Expect<T>

Expects that the property Throwable.message of the subject of this expectation is not null and holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Link copied to clipboard

Expects that the property Throwable.message of the subject of this expectation is not null and contains expected's toString representation and the toString representation of the otherExpected (if given), using a non-disjoint search.

Link copied to clipboard
fun <E : Comparable<E>, T : Iterable<E>> Expect<T>.min(): Expect<E>

Creates an Expect for the result of calling min() on the subject of this expectation, so that further fluent calls are assertions about it.

fun <E : Comparable<E>, T : Iterable<E>> Expect<T>.min(assertionCreator: Expect<E>.() -> Unit): Expect<T>

Expects that the result of calling min() on the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Link copied to clipboard
fun Expect<LocalDateTime>.month(assertionCreator: Expect<Int>.() -> Unit): Expect<LocalDateTime>

Expects that the property LocalDateTime.monthValueof the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

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

Expects that the property LocalDate.monthValue of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

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

Expects that the property ZonedDateTime.monthValue of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Link copied to clipboard

Restricts a contains assertion by specifying that the number of occurrences of the value which we are looking for occurs not at all or at most number of times within the search input.

Restricts a contains assertion by specifying that the number of occurrences of the entry which we are looking for occurs not at all or at most number of times within the IterableLike.

Link copied to clipboard

Expects that the type of the subject of this expectation is not the defined SubTypeOfSubjectT neither a subtype thereof.

fun <T> Expect<T>.notToBeAnInstanceOf(type: KClass<*>, vararg otherTypes: KClass<*>): Expect<T>

Expects that the type of the subject of this expectation is not the given type neither a subtype thereof and same same for the otherTypes.

Link copied to clipboard

Expects that the subject of this expectation (a CharSequence) CharSequence.kotlin.text.isNotBlank.

Link copied to clipboard

Expects that the subject of this expectation (a CharSequence) CharSequence.kotlin.text.isNotEmpty.

Expects that the subject of this expectation (a Collection) is not an empty Collection.

fun <T : Map<*, *>> Expect<T>.notToBeEmpty(): Expect<T>

Expects that the subject of this expectation (a Map) is not an empty Map.

Link copied to clipboard

Expects that the subject of this expectation (a Path) is not executable; meaning that there is a file system entry at the location the Path points to and that the current thread does not have the permission to execute it.

Link copied to clipboard
fun <T : Comparable<T>> Expect<T>.notToBeGreaterThan(expected: T): Expect<T>

Expects that the subject of this expectation is not greater than expected. The comparison is carried out with Comparable.compareTo.

Deprecated overload which shall help users to use notToBeGreaterThan instead.

Link copied to clipboard
fun <T : Comparable<T>> Expect<T>.notToBeLessThan(expected: T): Expect<T>

Expects that the subject of this expectation is not less than expected. The comparison is carried out with Comparable.compareTo.

Deprecated overload which shall help users to use toBeAfterOrTheSamePointInTimeAs instead.

Link copied to clipboard

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

Link copied to clipboard
fun <T> Expect<T>.notToBeTheInstance(expected: T): Expect<T>

Expects that the subject of this expectation is not the same instance as expected.

Link copied to clipboard

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

Link copied to clipboard

Expects that the subject of this expectation (a CharSequence) does not contain expected's toString representation and neither one of the otherExpected's toString representation (if given).

fun <E, T : Iterable<E>> Expect<T>.notToContain(expected: E, vararg otherExpected: E): Expect<T>

Expects that the subject of this expectation (an Iterable) has at least one element and that it does not contain the expected value and neither one of the otherExpected values (if given).

Link copied to clipboard
fun <K, T : Map<out K, *>> Expect<T>.notToContainKey(key: K): Expect<T>

Expects that the subject of this expectation (a Map) does not contain the given key.

Link copied to clipboard

Expects that the subject of this expectation (a CharSequence) does not end with expected.

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

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

Link copied to clipboard
fun <T> Expect<T>.notToEqual(expected: T): Expect<T>

Expects that the subject of this expectation is not equal to expected.

fun <T : BigDecimal?> Expect<T>.notToEqual(expected: T): Nothing

Deprecated as it would compare the subject against expected including scale -- many developers are not aware of that.

@JvmName(name = "notToEqualNull")
fun <T : BigDecimal> Expect<T?>.notToEqual(expected: Nothing?): Expect<T>

Expects that the subject of this expectation (a BigDecimal) is not null.

Link copied to clipboard

Expects that the subject of this expectation (a BigDecimal) is not equal to expected including BigDecimal.scale.

Link copied to clipboard
inline fun <T : Any> Expect<T?>.notToEqualNull(): Expect<T>

Expects that the subject of this expectation is not null and changes the subject to the non-nullable version.

inline fun <T : Any> Expect<T?>.notToEqualNull(noinline assertionCreator: Expect<T>.() -> Unit): Expect<T>

Expects that the subject of this expectation is not null and that it holds all assertions the given assertionCreator creates.

Link copied to clipboard

Expects that the subject of this expectation (a BigDecimal) is not numerically equal to expected.

Link copied to clipboard

Expects that the subject of this expectation is not equal to any value of expected.

Link copied to clipboard
fun <T> Expect<T>.notToEqualOneOf(expected: T, vararg otherValues: T): Expect<T>

Expects that the subject of this expectation is not equal to expected and otherValues.

Link copied to clipboard

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

Link copied to clipboard

Expects that the subject of this expectation (an Iterable) does not have a next element (Iterator.hasNext returns false).

Link copied to clipboard
fun <E : Any, T : Iterable<E?>> Expect<T>.notToHaveElementsOrAll(assertionCreatorOrNull: Expect<E>.() -> Unit?): Expect<T>

Expects that the subject of this expectation (an Iterable) either has no next element or

Link copied to clipboard
fun <E : Any, T : Iterable<E?>> Expect<T>.notToHaveElementsOrAny(assertionCreatorOrNull: Expect<E>.() -> Unit?): Expect<T>

Expects that the subject of this expectation (an Iterable) either has no next element or

Link copied to clipboard
fun <E : Any, T : Iterable<E?>> Expect<T>.notToHaveElementsOrNone(assertionCreatorOrNull: Expect<E>.() -> Unit?): Expect<T>

Expects that the subject of this expectation (an Iterable) either has no next element or

Link copied to clipboard

Expects that the subject of this expectation (an Iterator) does not have a next element.

Link copied to clipboard
fun <T : CharSequence> Expect<T>.notToMatch(pattern: Regex): Expect<T>

Expects that the subject of this expectation (a CharSequence) mismatches the given Regex.

Link copied to clipboard

Expects that the subject of this expectation (a CharSequence) does not start with expected.

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

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

Link copied to clipboard
fun <R, T : () -> R> Expect<T>.notToThrow(): Expect<R>

Expects that no Throwable is thrown at all when invoking the subject (a function with arity 0, i.e. without arguments) and changes the subject of this expectation to the return value of type R.

fun <R, T : () -> R> Expect<T>.notToThrow(assertionCreator: Expect<R>.() -> Unit): Expect<R>

Expects that no Throwable is thrown at all when invoking the subject (a function with arity 0, i.e. without arguments) and that the corresponding return value holds all assertions the given assertionCreator creates.

Link copied to clipboard
fun <T : Path> Expect<T>.parent(assertionCreator: Expect<Path>.() -> Unit): Expect<T>

Expects that this Path has a parent, that the parent holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Link copied to clipboard
@JvmName(name = "regexIgnoringCase")
fun <T : CharSequence> CharSequenceContains.CheckerStep<T, IgnoringCaseSearchBehaviour>.regex(pattern: String, vararg otherPatterns: String): Expect<T>

Finishes the specification of the sophisticated to contain expectation where the given regular expression pattern as well as the otherPatterns are expected to have a match (ignoring case), using a non-disjoint search.

Finishes the specification of the sophisticated to contain expectation where the given regular expression pattern as well as the otherPatterns are expected to have a match, using a non-disjoint search.

Finishes the specification of the sophisticated to contain expectation where the given Regex as well as the otherPatterns are expected to have a match, using a non-disjoint search.

Finishes the specification of the sophisticated to contain expectation where the given regular expression pattern as well as the otherPatterns are expected to to have at least one match (ignoring case), using a non-disjoint search.

Link copied to clipboard
fun <T : Path> Expect<T>.resolve(other: String): Expect<Path>

Expects that other resolves against this Path and creates an Expect for the resolved Path so that further fluent calls are assertions about it.

fun <T : Path> Expect<T>.resolve(other: String, assertionCreator: Expect<Path>.() -> Unit): Expect<T>

Expects that other resolves against this Path, that the resolved Path holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Link copied to clipboard
fun <K, V, T : Pair<K, V>> Expect<T>.second(assertionCreator: Expect<V>.() -> Unit): Expect<T>

Expects that the property Pair.second of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Link copied to clipboard
fun <E, T : Collection<E>> Expect<T>.size(assertionCreator: Expect<Int>.() -> Unit): Expect<T>

Expects that the property Collection.size of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

fun <K, V, T : Map<out K, V>> Expect<T>.size(assertionCreator: Expect<Int>.() -> Unit): Expect<T>

Expects that the property Map.size of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Link copied to clipboard

Expects that the subject of this expectation (a Path) is an absolute path; meaning that the Path specified in this instance starts at the file system root.

Link copied to clipboard

Expects that the subject of this expectation (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.

Link copied to clipboard

Expects that the subject of this expectation (a Result) is a failure (Result.isFailure) and that it encapsulates a Throwable of type ExpectedThrowableT or a subtype thereof.

inline fun <ExpectedThrowableT : Throwable> Expect<out Result<*>>.toBeAFailure(noinline assertionCreator: Expect<ExpectedThrowableT>.() -> Unit): Expect<ExpectedThrowableT>

Expects that the subject of this expectation (a Result) is a failure (Result.isFailure) , that it encapsulates a Throwable of type ExpectedThrowableT or a subtype thereof and that the ExpectedThrowableT holds all assertions the given assertionCreator creates.

Link copied to clipboard

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

Expects that the subject of this expectation (a ChronoLocalDateTime) is before the expected given as String in (modified) ISO 8601 format. The string will be converted to a LocalDateTime according to ISO 8601 but with a slight deviation. The alternative notation (e.g. 20200401120001 instead of 2020-04-01T12:00:01) is not supported and we accept a date without time in which case 00:00:00 is used. Following the supported formats from the longest to the shortest: yyyy-mm-ddThh:mm:ss.sss (up to 9 digits for nanoseconds) yyyy-mm-ddThh:mm:ss yyyy-mm-ddThh:mm yyyy-mm-dd

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

Expects that the subject of this expectation (a ChronoLocalDate) is after the expected given as String.

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

Expects that the subject of this expectation (a ChronoZonedDateTime) is after the expected given as String.

Link copied to clipboard

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

Expects that the subject of this expectation (a ChronoLocalDateTime) is before the expected given as String in (modified) ISO 8601 format. The string will be converted to a LocalDateTime according to ISO 8601 but with a slight deviation. The alternative notation (e.g. 20200401120001 instead of 2020-04-01T12:00:01) is not supported and we accept a date without time in which case 00:00:00 is used. Following the supported formats from the longest to the shortest: yyyy-mm-ddThh:mm:ss.sss (up to 9 digits for nanoseconds) yyyy-mm-ddThh:mm:ss yyyy-mm-ddThh:mm yyyy-mm-dd

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

Expects that the subject of this expectation (a ChronoLocalDate) is after or equal the expected given as String.

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

Expects that the subject of this expectation (a ChronoZonedDateTime) is after or equal the expected given as String.

Link copied to clipboard

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

Link copied to clipboard

Expects that the type of the subject of this expectation is the defined SubTypeOfSubjectT or a subtype thereof and down-casts the subject to SubTypeOfSubjectT.

inline fun <SubTypeOfSubjectT : Any> Expect<*>.toBeAnInstanceOf(noinline assertionCreator: Expect<SubTypeOfSubjectT>.() -> Unit): Expect<SubTypeOfSubjectT>

Expects that the type of the subject of this expectation is the defined SubTypeOfSubjectT or a subtype thereof and that it holds all assertions the given assertionCreator creates.

Link copied to clipboard

Expects that the subject of this expectation (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.

Link copied to clipboard

Expects that the subject of this expectation (a Result) is a success (Result.isSuccess) and returns an Expect for the inner type E.

fun <E, T : Result<E>> Expect<T>.toBeASuccess(assertionCreator: Expect<E>.() -> Unit): Expect<T>

Expects that the subject of this expectation (a Result) is a success (Result.isSuccess) and that it holds all assertions the given assertionCreator creates.

Link copied to clipboard

Expects that the subject of this expectation (a Path) is a symbolic link; meaning that there is a file system entry at the location the Path points to and that is a symbolic link.

Link copied to clipboard

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

Expects that the subject of this expectation (a ChronoLocalDateTime) is before the expected given as String in (modified) ISO 8601 format. The string will be converted to a LocalDateTime according to ISO 8601 but with a slight deviation. The alternative notation (e.g. 20200401120001 instead of 2020-04-01T12:00:01) is not supported and we accept a date without time in which case 00:00:00 is used. Following the supported formats from the longest to the shortest: yyyy-mm-ddThh:mm:ss.sss (up to 9 digits for nanoseconds) yyyy-mm-ddThh:mm:ss yyyy-mm-ddThh:mm yyyy-mm-dd

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

Expects that the subject of this expectation (a ChronoLocalDate) is before the expected given as String.

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

Expects that the subject of this expectation (a ChronoZonedDateTime) is before the expected given as String.

Link copied to clipboard

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

Expects that the subject of this expectation (a ChronoLocalDateTime) is before the expected given as String in (modified) ISO 8601 format. The string will be converted to a LocalDateTime according to ISO 8601 but with a slight deviation. The alternative notation (e.g. 20200401120001 instead of 2020-04-01T12:00:01) is not supported and we accept a date without time in which case 00:00:00 is used. Following the supported formats from the longest to the shortest: yyyy-mm-ddThh:mm:ss.sss (up to 9 digits for nanoseconds) yyyy-mm-ddThh:mm:ss yyyy-mm-ddThh:mm yyyy-mm-dd

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

Expects that the subject of this expectation (a ChronoLocalDate) is before or equal the expected given as String.

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

Expects that the subject of this expectation (a ChronoZonedDateTime) is before or equals the expected given as String.

Link copied to clipboard

Expects that the subject of this expectation (a CharSequence) CharSequence.kotlin.text.isEmpty.

Expects that the subject of this expectation (a Collection) is an empty Collection.

fun <T : Map<*, *>> Expect<T>.toBeEmpty(): Expect<T>

Expects that the subject of this expectation (a Map) is an empty Map.

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

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

Link copied to clipboard

Expects that the subject of this expectation is equal to expected where the comparison is carried out based on Comparable.compareTo.

Deprecated overload which shall help users to use toBeTheSamePointInTimeAs instead.

Link copied to clipboard

Expects that the subject of this expectation (a Path) is executable; meaning that there is a file system entry at the location the Path points to and that the current thread has the permission to execute it.

Link copied to clipboard
fun <T : Comparable<T>> Expect<T>.toBeGreaterThan(expected: T): Expect<T>

Expects that the subject of this expectation is greater than (>) expected. The comparison is carried out with Comparable.compareTo.

Deprecated overload which shall help users to use toBeAfter instead.

Link copied to clipboard

Expects that the subject of this expectation is greater than or equal (>=) expected. The comparison is carried out with Comparable.compareTo.

Deprecated overload which shall help users to use toBeAfterOrTheSamePointInTimeAs instead.

Link copied to clipboard
fun <T : Comparable<T>> Expect<T>.toBeLessThan(expected: T): Expect<T>

Expects that the subject of this expectation is less than (<) expected. The comparison is carried out with Comparable.compareTo.

Deprecated overload which shall help users to use toBeBefore instead.

Link copied to clipboard

Expects that the subject of this expectation is less than or equal (<=) expected. The comparison is carried out with Comparable.compareTo.

Deprecated overload which shall help users to use toBeBeforeOrTheSamePointInTimeAs instead.

Link copied to clipboard
fun <E : Any, T : Optional<E>> Expect<T>.toBePresent(): Expect<E>

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

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

Expects that the subject of this expectation (an Optional) is present and that the wrapped value of type E holds all assertions the given assertionCreator creates.

Link copied to clipboard

Expects that the subject of this expectation (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.

Link copied to clipboard

Expects that the subject of this expectation (a Path) is a relative path; meaning that the Path specified in this instance does not start at the file system root.

Link copied to clipboard
fun <T> Expect<T>.toBeTheInstance(expected: T): Expect<T>

Expects that the subject of this expectation is the same instance as expected.

Link copied to clipboard

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

Expects that the subject of this expectation (a ChronoLocalDateTime) is before the expected given as String in (modified) ISO 8601 format. The string will be converted to a LocalDateTime according to ISO 8601 but with a slight deviation. The alternative notation (e.g. 20200401120001 instead of 2020-04-01T12:00:01) is not supported and we accept a date without time in which case 00:00:00 is used. Following the supported formats from the longest to the shortest: yyyy-mm-ddThh:mm:ss.sss (up to 9 digits for nanoseconds) yyyy-mm-ddThh:mm:ss yyyy-mm-ddThh:mm yyyy-mm-dd

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

Expects that the subject of this expectation (a ChronoLocalDate) is equal to the expected given as String.

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

Expects that the subject of this expectation (a ChronoZonedDateTime) is equal to the expected given as String.

Link copied to clipboard

Expects that the subject of this expectation (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.

Link copied to clipboard
fun <E : Any, T : Iterable<E?>> Expect<T>.toContain(assertionCreatorOrNull: Expect<E>.() -> Unit?): Expect<T>

Expects that the subject of this expectation (an Iterable) contains an entry holding the assertions created by assertionCreatorOrNull or an entry which is null in case assertionCreatorOrNull is defined as null.

Expects that the subject of this expectation (a CharSequence) contains expected's toString representation and the toString representation of the otherExpected (if given), using a non-disjoint search.

fun <E, T : Iterable<E>> Expect<T>.toContain(expected: E, vararg otherExpected: E): Expect<T>

Expects that the subject of this expectation (an Iterable) contains the expected value and the otherExpected values (if given).

fun <E : Any, T : Iterable<E?>> Expect<T>.toContain(assertionCreatorOrNull: Expect<E>.() -> Unit?, vararg otherAssertionCreatorsOrNulls: Expect<E>.() -> Unit?): Expect<T>

Expects that the subject of this expectation (an Iterable) contains an entry holding the assertions created by assertionCreatorOrNull or an entry which is null in case assertionCreatorOrNull is defined as null -- likewise an entry (can be the same) is searched for each of the otherAssertionCreatorsOrNulls.

fun <K, V, T : Map<out K, V>> Expect<T>.toContain(keyValuePair: Pair<K, V>, vararg otherPairs: Pair<K, V>): Expect<T>

Expects that the subject of this expectation (a Map) contains a key as defined by keyValuePair's Pair.first with a corresponding value as defined by keyValuePair's Pair.second -- optionally the same assertions are created for the otherPairs.

inline fun <K, V : Any, T : Map<out K, V?>> Expect<T>.toContain(keyValue: KeyValue<K, V>, vararg otherKeyValues: KeyValue<K, V>): Expect<T>

Expects that the subject of this expectation (a Map) contains a key as defined by keyValue's KeyValue.key with a corresponding value which either holds all assertions keyValue's KeyValue.valueAssertionCreatorOrNull creates or needs to be null in case KeyValue.valueAssertionCreatorOrNull is defined as null -- optionally the same assertions are created for the otherKeyValues.

Link copied to clipboard
inline fun <E, T : Iterable<E>> Expect<T>.toContainElementsOf(expectedIterableLike: IterableLike): Expect<T>

Expects that the subject of this expectation (an Iterable) contains all elements of expectedIterableLike.

Link copied to clipboard
fun <K, V : Any, T : Map<out K, V?>> Expect<T>.toContainEntriesOf(mapLike: MapLike): Expect<T>

Expects that the subject of this expectation (a Map) contains the key-value pairs of the given mapLike.

Link copied to clipboard
fun <E : Any, T : Iterable<E?>> Expect<T>.toContainExactly(assertionCreatorOrNull: Expect<E>.() -> Unit?): Expect<T>

Expects that the subject of this expectation (an Iterable) contains only an entry holding the assertions created by assertionCreatorOrNull or only one entry which is null in case assertionCreatorOrNull is defined as null.

fun <E, T : Iterable<E>> Expect<T>.toContainExactly(expected: E, vararg otherExpected: E, report: InOrderOnlyReportingOptions.() -> Unit = {}): Expect<T>

Expects that the subject of this expectation (an Iterable) contains only the expected value and the otherExpected values (if given) in the defined order.

fun <E : Any, T : Iterable<E?>> Expect<T>.toContainExactly(assertionCreatorOrNull: Expect<E>.() -> Unit?, vararg otherAssertionCreatorsOrNulls: Expect<E>.() -> Unit?, report: InOrderOnlyReportingOptions.() -> Unit = {}): Expect<T>

Expects that the subject of this expectation (an Iterable) contains only an entry holding the assertions created by assertionCreatorOrNull or null in case assertionCreatorOrNull is defined as null and likewise an additional entry for each otherAssertionCreatorsOrNulls (if given) whereas the entries have to appear in the defined order.

Link copied to clipboard
inline fun <E, T : Iterable<E>> Expect<T>.toContainExactlyElementsOf(expectedIterableLike: IterableLike, noinline report: InOrderOnlyReportingOptions.() -> Unit = {}): Expect<T>

Expects that the subject of this expectation (an Iterable) contains only elements of expectedIterableLike in same order

Link copied to clipboard
fun <K, T : Map<out K, *>> Expect<T>.toContainKey(key: K): Expect<T>

Expects that the subject of this expectation (a Map) contains the given key.

Link copied to clipboard
fun <K, V, T : Map<out K, V>> Expect<T>.toContainOnly(keyValuePair: Pair<K, V>, vararg otherPairs: Pair<K, V>): Expect<T>

Expects that the subject of this expectation (a Map) contains only (in any order) a key as defined by keyValuePair's Pair.first with a corresponding value as defined by keyValuePair's Pair.second -- optionally the same assertions are created for the otherPairs.

inline fun <K, V : Any, T : Map<out K, V?>> Expect<T>.toContainOnly(keyValue: KeyValue<K, V>, vararg otherKeyValues: KeyValue<K, V>): Expect<T>

Expects that the subject of this expectation (a Map) contains only (in any order) a key as defined by keyValue's KeyValue.key with a corresponding value which either holds all assertions keyValue's KeyValue.valueAssertionCreatorOrNull creates or needs to be null in case KeyValue.valueAssertionCreatorOrNull is defined as null -- optionally the same assertions are created for the otherKeyValues.

Link copied to clipboard
fun <K, V : Any, T : Map<out K, V?>> Expect<T>.toContainOnlyEntriesOf(mapLike: MapLike): Expect<T>

Expects that the subject of this expectation (a Map) contains only (in any order) the key-value pairs of the given mapLike.

Link copied to clipboard
fun <T : CharSequence> Expect<T>.toContainRegex(pattern: String, vararg otherPatterns: String): Expect<T>
fun <T : CharSequence> Expect<T>.toContainRegex(pattern: Regex, vararg otherPatterns: Regex): Expect<T>

Expects that the subject of this expectation (a CharSequence) contains a sequence which matches the given regular expression pattern as well as the otherPatterns (if given), using a non-disjoint search.

Link copied to clipboard

Expects that the subject of this expectation (a CharSequence) ends with expected.

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

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

Link copied to clipboard
fun <T> Expect<T>.toEqual(expected: T): Expect<T>

Expects that the subject of this expectation is equal to expected where the comparison is carried out based on Any.equals.

@JvmName(name = "toBeNullable")
fun <T : BigDecimal?> Expect<T>.toEqual(expected: T): Nothing
fun <T : BigDecimal> Expect<T>.toEqual(expected: T): Nothing

Deprecated as it would compare the subject against expected including scale -- many developers are not aware of that.

@JvmName(name = "toBeNull")
fun <T : BigDecimal> Expect<T?>.toEqual(expected: Nothing?): Expect<T?>

Expects that the subject of this expectation (a BigDecimal) is null.

Link copied to clipboard

Expects that the subject of this expectation (a BigDecimal) is equal to expected including BigDecimal.scale.

Link copied to clipboard
fun <K, V, T : Map.Entry<K, V>> Expect<T>.toEqualKeyValue(key: K, value: V): Expect<T>

Expects that the property Map.Entry.key of the subject of this expectation is equal to the given key and the property Map.Entry.value is equal to the given value.

Link copied to clipboard
fun <T : Any> Expect<T?>.toEqualNullIfNullGivenElse(assertionCreatorOrNull: Expect<T>.() -> Unit?): Expect<T?>

Expects that the subject of this expectation is either null in case assertionCreatorOrNull is null or is not null and holds all assertions assertionCreatorOrNull creates.

Link copied to clipboard

Expects that the subject of this expectation (a BigDecimal) is numerically equal to expected.

Link copied to clipboard

Expects that the subject of this expectation (a Double) is equal to expected with an error tolerance (range including bounds).

Expects that the subject of this expectation (a Float) is equal to expected with an error tolerance (range including bounds).

Link copied to clipboard
fun <T : Path> Expect<T>.toExist(): Expect<T>

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

Link copied to clipboard

Expects that the subject of this expectation (an Iterable) has a next element (Iterator.hasNext returns true).

Link copied to clipboard
fun <E : Any, T : Iterable<E?>> Expect<T>.toHaveElementsAndAll(assertionCreatorOrNull: Expect<E>.() -> Unit?): Expect<T>

Expects that the subject of this expectation (an Iterable) has next element(s) and

Link copied to clipboard
fun <E : Any, T : Iterable<E?>> Expect<T>.toHaveElementsAndAny(assertionCreatorOrNull: Expect<E>.() -> Unit?): Expect<T>

Expects that the subject of this expectation (an Iterable) has next element(s) and

Link copied to clipboard

Expects that the subject of this expectation (an Iterable) has next element(s) and that it does not have duplicate elements.

Link copied to clipboard
fun <E : Any, T : Iterable<E?>> Expect<T>.toHaveElementsAndNone(assertionCreatorOrNull: Expect<E>.() -> Unit?): Expect<T>

Expects that the subject of this expectation (an Iterable) has next element(s) and

Link copied to clipboard
fun <T : Iterator<*>> Expect<T>.toHaveNext(): Expect<T>

Expects that the subject of this expectation (an Iterator) has a next element.

Link copied to clipboard
fun <T : Collection<*>> Expect<T>.toHaveSize(expected: Int): Expect<T>

Expects that the subject of this expectation (a Collection) has the given expected size.

Link copied to clipboard
fun <T : Path> Expect<T>.toHaveTheDirectoryEntries(entry: String, vararg otherEntries: String): Expect<T>

Expects that the subject of this expectation (a Path) is a directory having the provided entries. That means that there is a file system entry at the location the Path points to and that it is a directory. Furthermore, every argument string resolved against the subject yields an existing file system entry.

Link copied to clipboard

Expects that the subject of this expectation (a Path) has the same binary content as targetPath.

Link copied to clipboard
fun <T : Path> Expect<T>.toHaveTheSameTextualContentAs(targetPath: Path, sourceCharset: Charset = Charsets.UTF_8, targetCharset: Charset = Charsets.UTF_8): Expect<T>

Expects that the subject of this expectation (a Path) has the same textual content as targetPath taking the given encodings into account (UTF-8 if none given).

Link copied to clipboard
fun <T> Expect<T>.toHoldThirdPartyExpectation(description: String, representation: Any?, expectationExecutor: (T) -> Unit): Expect<T>

Expects that the expectationExecutor doesn't throw and creates an assertion representing this third party expectation with the given description and representation.

Link copied to clipboard
fun <T : CharSequence> Expect<T>.toMatch(pattern: Regex): Expect<T>

Expects that the subject of this expectation (a CharSequence) matches the given Regex .

Link copied to clipboard

Expects that the subject of this expectation (a CharSequence) starts with expected.

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

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

Link copied to clipboard

Expects that invoking the subject (a function with arity 0, i.e. without arguments) throws a Throwable of type ExpectedThrowableT or a subtype.

inline fun <ExpectedThrowableT : Throwable> Expect<out () -> Any?>.toThrow(noinline assertionCreator: Expect<ExpectedThrowableT>.() -> Unit): Expect<ExpectedThrowableT>

Expects that invoking the subject (a function with arity 0, i.e. without arguments) throws a Throwable of type ExpectedThrowableT or a subtype and that it holds all assertions the given assertionCreator creates.

Link copied to clipboard
fun <K, V, T : Map.Entry<K, V>> Expect<T>.value(assertionCreator: Expect<V>.() -> Unit): Expect<T>

Expects that the property Map.Entry.value of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Finishes the specification of the sophisticated to contain expectation where the expected value shall be searched (ignoring case), using a non-disjoint search.

Finishes the specification of the sophisticated to contain expectation where the expected object shall be searched, using a non-disjoint search.

Finishes the specification of the sophisticated to contain expectation where the expected value shall be searched (ignoring case), using a non-disjoint search where it needs to be contained at least once.

Finishes the specification of the sophisticated to contain expectation where the subject (an IterableLike) needs to contain the expected value.

Finishes the specification of the sophisticated to contain expectation where the subject (an IterableLike) needs to contain only the expected value.

Link copied to clipboard
fun <K, V, T : Map<out K, V>> Expect<T>.values(assertionCreator: Expect<Collection<V>>.() -> Unit): Expect<T>

Expects that the property Map.keys of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

Finishes the specification of the sophisticated to contain expectation where the expected value as well as the otherExpected values shall be searched (ignoring case), using a non-disjoint search.

Finishes the specification of the sophisticated to contain expectation where the expected value as well as the otherExpected values shall be searched, using a non-disjoint search.

Finishes the specification of the sophisticated to contain expectation where the expected value as well as the otherExpected values shall be searched (ignoring case), using a non-disjoint search where each need to be contained at least once.

fun <E, T : IterableLike> IterableLikeContains.CheckerStep<E, T, InAnyOrderSearchBehaviour>.values(expected: E, vararg otherExpected: E): Expect<T>

Finishes the specification of the sophisticated to contain expectation where the subject (an IterableLike) needs to contain the expected value as well as the otherExpected values where it does not matter in which order they appear.

Finishes the specification of the sophisticated to contain expectation where the subject (an IterableLike) needs to contain only the expected value as well as the otherExpected values where it does not matter in which order.

Finishes the specification of the sophisticated to contain expectation where the subject (an IterableLike) needs to contain only the expected value as well as the otherExpected values in the specified order.

Link copied to clipboard

Uses the given options to override (parts) of the existing configuration.

Uses the given configuration-lambda to create a FeatureExpectOptions which in turn is used to re-define (parts) of the existing configuration.

Uses the given configuration-lambda to create an RootExpectOptions which in turn is used to re-define (parts) of the existing configuration.

Link copied to clipboard
fun <T, R> FeatureExpect<T, R>.withRepresentation(representationProvider: (R) -> Any): Expect<R>
fun <T> RootExpect<T>.withRepresentation(representationProvider: (T) -> Any): Expect<T>

Uses the given representationProvider to retrieve a representation which can be based on the current subject where it is used as new representation of the subject instead of the representation that has been defined so far (which defaults to the subject itself).

fun <T, R> FeatureExpect<T, R>.withRepresentation(textRepresentation: String): Expect<R>
fun <T> RootExpect<T>.withRepresentation(textRepresentation: String): Expect<T>

Wraps the given textRepresentation into a Text and uses it as representation of the subject instead of the representation that has been defined so far (which defaults to the subject itself).

Link copied to clipboard
fun Expect<LocalDateTime>.year(assertionCreator: Expect<Int>.() -> Unit): Expect<LocalDateTime>

Expects that the property LocalDateTime.year of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

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

Expects that the property LocalDate.yearof the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.

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

Expects that the property ZonedDateTime.year of the subject of this expectation holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of this expectation.