Contains API which provides an infix API in English and which has its design focus on usability in conjunction with code completion.
object absolute : Keyword
A helper construct to allow expressing assertions about a path being absolute. It can be used for a parameterless function so that it has one parameter and thus can be used as infix function. |
|
object aDirectory : Keyword
A helper construct to allow expressing assertions about a path being a directory. It can be used for a parameterless function so that it has one parameter and thus can be used as infix function. |
|
object aRegularFile : Keyword
A helper construct to allow expressing assertions about a path being a regular file. It can be used for a parameterless function so that it has one parameter and thus can be used as infix function. |
|
object blank : Keyword
Represents a helper construct which allows to express blankness. It can be used for a parameterless function so that it has one parameter and thus can be used as infix function. |
|
object case : Keyword
Represents the pseudo keyword |
|
object empty : Keyword
Represents a helper construct which allows to express emptiness. It can be used for a parameterless function so that it has one parameter and thus can be used as infix function. |
|
object entries : Keyword
Represents the pseudo keyword |
|
object executable : Keyword
A helper construct to allow expressing assertions about a path being executable. It can be used for a parameterless function so that it has one parameter and thus can be used as infix function. |
|
object existing : Keyword
A helper construct to allow expressing assertions about path existence. It can be used for a parameterless function so that it has one parameter and thus can be used as infix function. |
|
object group : Keyword
Represents the pseudo keyword |
|
interface Keyword
Marker interface for keywords. |
|
object next : Keyword
Represents the pseudo keyword |
|
object noDuplicates : Keyword
A helper construct to allow expressing assertions about iterable contains no duplicates. It can be used for a parameterless function so that it has one parameter and thus can be used as infix function. |
|
object o : Keyword
Represents a filler, a pseudo keyword where there isn't really a good keyword.
A reader should skip this filler without reading it. For instance, |
|
object only : Keyword
Represents the pseudo keyword |
|
object order : Keyword
Represents the pseudo keyword |
|
object present : Keyword
Represents a helper construct which allows to express presence. It can be used for a parameterless function so that it has one parameter and thus can be used as infix function. |
|
object readable : Keyword
A helper construct to allow expressing assertions about a path being readable. It can be used for a parameterless function so that it has one parameter and thus can be used as infix function. |
|
object relative : Keyword
A helper construct to allow expressing assertions about a path being relative. It can be used for a parameterless function so that it has one parameter and thus can be used as infix function. |
|
object success : Keyword
Represents the pseudo keyword |
|
object writable : Keyword
A helper construct to allow expressing assertions about a path being writable. It can be used for a parameterless function so that it has one parameter and thus can be used as infix function. |
annotation class ExperimentalWithOptions |
val Expect<LocalDate>.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. val Expect<LocalDateTime>.day: Expect<Int>
Creates an Expect for the property LocalDateTime.dayOfMonth of the subject of the assertion, so that further fluent calls are assertions about it. val Expect<ZonedDateTime>.day: Expect<Int>
Creates an Expect for the property ZonedDateTime.dayOfMonth of the subject of the assertion, so that further fluent calls are assertions about it. |
|
val Expect<LocalDate>.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. val Expect<LocalDateTime>.dayOfWeek: Expect<DayOfWeek>
Creates an Expect for the property LocalDateTime.dayOfWeek of the subject of the assertion, so that further fluent calls are assertions about it. val Expect<ZonedDateTime>.dayOfWeek: Expect<DayOfWeek>
Creates an Expect for the property ZonedDatetime.dayOfWeek of the subject of the assertion, so that further fluent calls are assertions about it. |
|
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. |
|
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. |
|
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. |
|
val <K, T : Pair<K, *>> Expect<T>.first: Expect<K>
Creates an Expect for the property Pair.first of the subject of the assertion, so that further fluent calls are assertions about it. |
|
val <T> Expect<T>.it: Expect<T>
Inline property referring actually to |
|
val <T> Expect<T>.its: Expect<T>
Inline property referring actually to |
|
val <K, T : Entry<K, *>> Expect<T>.key: Expect<K>
Creates an Expect for the property Map.Entry.key of the subject of the assertion, so that further fluent calls are assertions about it. |
|
val <K, T : Map<out K, *>> Expect<T>.keys: Expect<Set<K>>
Creates an Expect for the property Map.keys of the subject of the assertion, so that further fluent calls are assertions about it. |
|
val <T : Throwable> Expect<T>.message: Expect<String>
Expects that the property Throwable.message of the subject of the assertion is not null, creates an Expect for it and returns it. |
|
val Expect<LocalDate>.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. val Expect<LocalDateTime>.month: Expect<Int>
Creates an Expect for the property LocalDateTime.monthValue of the subject of the assertion, so that further fluent calls are assertions about it. val Expect<ZonedDateTime>.month: Expect<Int>
Creates an Expect for the property ZonedDateTime.monthValue of the subject of the assertion, so that further fluent calls are assertions about it. |
|
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. |
|
val <V, T : Pair<*, V>> Expect<T>.second: Expect<V>
Creates an Expect for the property Pair.second of the subject of the assertion, so that further fluent calls are assertions about it. |
|
val <T : Collection<*>> Expect<T>.size: Expect<Int>
Creates an Expect for the property Collection.size of the subject of the assertion, so that further fluent calls are assertions about it. |
|
val <V, T : Entry<*, V>> Expect<T>.value: Expect<V>
Creates an Expect for the property Map.Entry.value of the subject of the assertion, so that further fluent calls are assertions about it. |
|
val <V, T : Map<*, V>> Expect<T>.values: Expect<Collection<V>>
Creates an Expect for the property Map.values of the subject of the assertion, so that further fluent calls are assertions about it. |
|
val Expect<LocalDate>.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. val Expect<LocalDateTime>.year: Expect<Int>
Creates an Expect for the property LocalDateTime.year[LocalDateTime.getYear of the subject of the assertion, so that further fluent calls are assertions about it. val Expect<ZonedDateTime>.year: Expect<Int>
Creates an Expect for the property ZonedDateTime.year of the subject of the assertion, so that further fluent calls are assertions about it. |
fun <T> all(t: T, vararg ts: T): All<T>
Helper function to create an All based on the given t and ts
-- allows to express infix fun <E : Any, T : Iterable<E?>> Expect<T>.all(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>
Expects that the subject of the assertion (an Iterable) has at least one element and
that either every element holds all assertions created by the assertionCreatorOrNull or
that all elements are |
|
infix fun <T> Expect<T>.and(o: o): Expect<T>
Can be used to separate single assertions. 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. infix fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InOrderSearchBehaviour>.and(only: only): IterableContains.Builder<E, T, InOrderOnlySearchBehaviour>
Defines that the constraint " infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderSearchBehaviour>.and(only: only): IterableLikeContains.EntryPointStep<E, T, InOrderOnlySearchBehaviour>
Defines that the constraint " infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InOrderSearchBehaviour>.and(only: only): MapLikeContains.EntryPointStep<K, V, T, InOrderOnlySearchBehaviour>
Defines that the constraint " |
|
infix fun <E : Any, T : Iterable<E?>> Expect<T>.any(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>
Expects that the subject of the assertion (an Iterable) contains an entry holding
the assertions created by assertionCreatorOrNull or an entry which is |
|
infix fun <K, V, T : Map<out K, V>> Expect<T>.asEntries(o: o): Expect<Set<Entry<K, V>>>
Turns infix fun <K, V, T : Map<out K, V>> Expect<T>.asEntries(assertionCreator: Expect<Set<Entry<K, V>>>.() -> Unit): Expect<T>
Turns |
|
infix fun <E, T : Sequence<E>> Expect<T>.asIterable(o: o): Expect<Iterable<E>>
Turns infix fun <E, T : Sequence<E>> Expect<T>.asIterable(assertionCreator: Expect<Iterable<E>>.() -> Unit): Expect<T>
Expects that the subject of the assertion holds all assertions the given assertionCreator creates for the subject as Iterable. |
|
infix fun <E> Expect<out Array<out E>>.asList(o: o): Expect<List<E>>
Turns infix fun <E> Expect<Array<E>>.asList(assertionCreator: Expect<List<E>>.() -> Unit): Expect<Array<E>> infix fun Expect<ByteArray>.asList(assertionCreator: Expect<List<Byte>>.() -> Unit): Expect<ByteArray> infix fun Expect<CharArray>.asList(assertionCreator: Expect<List<Char>>.() -> Unit): Expect<CharArray> infix fun Expect<ShortArray>.asList(assertionCreator: Expect<List<Short>>.() -> Unit): Expect<ShortArray> infix fun Expect<IntArray>.asList(assertionCreator: Expect<List<Int>>.() -> Unit): Expect<IntArray> infix fun Expect<LongArray>.asList(assertionCreator: Expect<List<Long>>.() -> Unit): Expect<LongArray> infix fun Expect<FloatArray>.asList(assertionCreator: Expect<List<Float>>.() -> Unit): Expect<FloatArray> infix fun Expect<DoubleArray>.asList(assertionCreator: Expect<List<Double>>.() -> Unit): Expect<DoubleArray> infix fun Expect<BooleanArray>.asList(assertionCreator: Expect<List<Boolean>>.() -> Unit): Expect<BooleanArray> infix fun <E, T : Iterable<E>> Expect<T>.asList(assertionCreator: Expect<List<E>>.() -> Unit): Expect<T>
Expects that the subject of the assertion holds all assertions the given assertionCreator creates for the subject as List. infix fun Expect<ByteArray>.asList(o: o): Expect<List<Byte>>
Turns infix fun Expect<CharArray>.asList(o: o): Expect<List<Char>>
Turns infix fun Expect<ShortArray>.asList(o: o): Expect<List<Short>>
Turns infix fun Expect<IntArray>.asList(o: o): Expect<List<Int>>
Turns infix fun Expect<LongArray>.asList(o: o): Expect<List<Long>>
Turns infix fun Expect<FloatArray>.asList(o: o): Expect<List<Float>>
Turns infix fun Expect<DoubleArray>.asList(o: o): Expect<List<Double>>
Turns infix fun Expect<BooleanArray>.asList(o: o): Expect<List<Boolean>>
Turns infix fun <E, T : Iterable<E>> Expect<T>.asList(o: o): Expect<List<E>>
Turns |
|
infix fun <T : File> Expect<T>.asPath(o: o): Expect<Path>
Turns infix 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. |
|
infix fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.EntryPointStep<T, S>.atLeast(times: Int): AtLeastCheckerStep<T, S> infix fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.Builder<T, S>.atLeast(times: Int): AtLeastCheckerOption<T, S>
Restricts a infix fun <E, T : Iterable<E>, S : InAnyOrderSearchBehaviour> IterableContains.Builder<E, T, S>.atLeast(times: Int): AtLeastCheckerOption<E, T, S>
Restricts a infix fun <E, T, S : InAnyOrderSearchBehaviour> IterableLikeContains.EntryPointStep<E, T, S>.atLeast(times: Int): AtLeastCheckerStep<E, T, S>
Restricts a |
|
infix fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.EntryPointStep<T, S>.atMost(times: Int): AtMostCheckerStep<T, S> infix fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.Builder<T, S>.atMost(times: Int): AtMostCheckerOption<T, S>
Restricts a infix fun <E, T : Iterable<E>, S : InAnyOrderSearchBehaviour> IterableContains.Builder<E, T, S>.atMost(times: Int): AtMostCheckerOption<E, T, S>
Restricts a infix fun <E, T, S : InAnyOrderSearchBehaviour> IterableLikeContains.EntryPointStep<E, T, S>.atMost(times: Int): AtMostCheckerStep<E, T, S>
Restricts a |
|
infix fun <T> Expect<T>.because(keyWithCreator: KeyWithCreator<String, T>): Expect<T>
Allows to state a reason for one or multiple assertions for the current subject. |
|
infix fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InAnyOrderSearchBehaviour>.but(only: only): IterableContains.Builder<E, T, InAnyOrderOnlySearchBehaviour>
Defines that the constraint " infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InAnyOrderSearchBehaviour>.but(only: only): IterableLikeContains.EntryPointStep<E, T, InAnyOrderOnlySearchBehaviour>
Defines that the constraint " infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderSearchBehaviour>.but(only: only): MapLikeContains.EntryPointStep<K, V, T, InAnyOrderOnlySearchBehaviour>
Defines that the constraint " |
|
infix fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> AtLeastCheckerStep<T, S>.butAtMost(times: Int): ButAtMostCheckerStep<T, S> infix fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> AtLeastCheckerOption<T, S>.butAtMost(times: Int): ButAtMostCheckerOption<T, S>
Restricts a infix fun <E, T : Iterable<E>, S : InAnyOrderSearchBehaviour> AtLeastCheckerOption<E, T, S>.butAtMost(times: Int): ButAtMostCheckerOption<E, T, S>
Restricts a infix fun <E, T, S : InAnyOrderSearchBehaviour> AtLeastCheckerStep<E, T, S>.butAtMost(times: Int): ButAtMostCheckerStep<E, T, S>
Restricts a |
|
fun <TExpected : Throwable> Expect<out Throwable>.cause(): Expect<TExpected>
Expects that the property Throwable.cause of the subject is a TExpected (the same type or a sub-type), creates an Expect of the TExpected type for it and returns it. infix fun <TExpected : Throwable> Expect<out Throwable>.cause(assertionCreator: Expect<TExpected>.() -> Unit): Expect<TExpected>
Expects that the property Throwable.cause of the subject is a TExpected (the same type or a sub-type) and holds all assertions the given assertionCreator creates for it and returns this assertion container. |
|
infix fun <T : CharSequence> Expect<T>.contains(o: o): CharSequenceContains.EntryPointStep<T, NoOpSearchBehaviour>
Starts a sophisticated infix fun <T : CharSequence> Expect<T>.contains(expected: CharSequenceOrNumberOrChar): Expect<T>
Expects that the subject of the assertion (a CharSequence) contains the expected's toString representation. infix fun <T : CharSequence> Expect<T>.contains(values: Values<CharSequenceOrNumberOrChar>): Expect<T>
Expects that the subject of the assertion (a CharSequence) contains the toString representation of the given values using a non disjoint search. infix fun <T : CharSequence> Expect<T>.contains(pattern: Regex): Expect<T>
Expects that the subject of the assertion (a CharSequence) contains a sequence which matches the given regular expression pattern. infix fun <T : CharSequence> Expect<T>.contains(regexPatterns: RegexPatterns): Expect<T>
Expects that the subject of the assertion (a CharSequence) contains a sequence which matches the given regular expression regexPatterns, using a non disjoint search. infix fun <T : CharSequence> Expect<T>.contains(patterns: All<Regex>): Expect<T>
Expects that the subject of the assertion (a CharSequence) contains a sequence which matches the given regular expression patterns, using a non disjoint search. infix fun <E, T : Iterable<E>> Expect<T>.contains(expected: E): Expect<T>
Expects that the subject of the assertion (an Iterable) contains the expected value. infix fun <E, T : Iterable<E>> Expect<T>.contains(values: Values<E>): Expect<T>
Expects that the subject of the assertion (an Iterable) contains the expected values. infix fun <E : Any, T : Iterable<E?>> Expect<T>.contains(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>
Expects that the subject of the assertion (an Iterable) contains an entry holding the
assertions created by assertionCreatorOrNull or an entry which is infix fun <E : Any, T : Iterable<E?>> Expect<T>.contains(entries: Entries<E>): Expect<T>
Expects that the subject of the assertion (an Iterable) contains an entry holding the
assertions created by entries.assertionCreatorOrNull or an entry
which is infix fun <E, T : Iterable<E>> Expect<T>.contains(noDuplicates: noDuplicates): Expect<T>
Expects that the subject of the assertion (an Iterable) does not have duplicate elements. infix fun <K, V, T : Map<out K, V>> Expect<T>.contains(keyValuePair: Pair<K, V>): Expect<T>
Expects that the subject of the assertion (a Map) contains a key as defined by keyValuePair's Pair.first with a corresponding value as defined by keyValuePair's Pair.second infix fun <K, V, T : Map<out K, V>> Expect<T>.contains(keyValuePairs: Pairs<K, V>): Expect<T>
Expects the subject of the assertion (a Map) contains for each entry in keyValuePairs, a key as defined by that entry's Pair.first with a corresponding value as defined by entry's Pair.second. infix fun <K, V : Any, T : Map<out K, V?>> Expect<T>.contains(keyValue: KeyWithValueCreator<K, V>): Expect<T>
Expects that the subject of the assertion (a Map) contains a key as defined by keyValue's KeyWithValueCreator.key
with a corresponding value which either holds all assertions keyValue's
KeyWithValueCreator.valueAssertionCreatorOrNull creates or needs to be infix fun <K, V : Any, T : Map<out K, V?>> Expect<T>.contains(allKeyValues: KeyValues<K, V>): Expect<T>
Expects that the subject of the assertion (a Map) contains for each KeyWithValueCreator in allKeyValues,
a key as defined by KeyWithValueCreator.key with a corresponding value which either holds all
assertions KeyWithValueCreator's KeyWithValueCreator.valueAssertionCreatorOrNull creates or needs
to be |
|
infix fun <E, T : Iterable<E>> Expect<T>.containsElementsOf(expectedIterableLike: IterableLike): Expect<T>
Expects that the subject of the assertion (an Iterable) contains all elements of expectedIterableLike. |
|
infix fun <K, V : Any, T : Map<out K, V?>> Expect<T>.containsEntriesOf(mapLike: MapLike): Expect<T>
Expects that the subject of the assertion (a Map) contains the key-value pairs of the given mapLike. |
|
infix fun <E, T : Iterable<E>> Expect<T>.containsExactly(expected: E): Expect<T>
Expects that the subject of the assertion (an Iterable) contains only the expected value. infix fun <E, T : Iterable<E>> Expect<T>.containsExactly(values: Values<E>): Expect<T>
Expects that the subject of the assertion (an Iterable) contains only the expected values in the defined order. infix fun <E : Any, T : Iterable<E?>> Expect<T>.containsExactly(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>
Expects that the subject of the assertion (an Iterable) contains only an entry holding
the assertions created by assertionCreatorOrNull or only one entry which is infix fun <E : Any, T : Iterable<E?>> Expect<T>.containsExactly(entries: Entries<E>): Expect<T>
Expects that the subject of the assertion (an Iterable) contains only an entry holding
the assertions created by entries.assertionCreatorOrNull or
|
|
infix fun <E, T : Iterable<E>> Expect<T>.containsExactlyElementsOf(expectedIterableLike: IterableLike): Expect<T>
Expects that the subject of the assertion (an Iterable) contains only elements of expectedIterableLike in same order |
|
infix fun <K, T : Map<out K, *>> Expect<T>.containsKey(key: K): Expect<T>
Expects that the subject of the assertion (a Map) contains the given key. |
|
infix fun <T : CharSequence> Expect<T>.containsNot(o: o): NotCheckerStep<T, NotSearchBehaviour>
Starts a sophisticated infix fun <T : CharSequence> Expect<T>.containsNot(expected: CharSequenceOrNumberOrChar): Expect<T>
Expects that the subject of the assertion (a CharSequence) does not contain expected's toString representation. infix fun <T : CharSequence> Expect<T>.containsNot(values: Values<CharSequenceOrNumberOrChar>): Expect<T>
Expects that the subject of the assertion (a CharSequence) does not contain the toString representation of the given values. infix fun <E, T : Iterable<E>> Expect<T>.containsNot(expected: E): Expect<T>
Expects that the subject of the assertion (an Iterable) has at least one element and that it does not contain the expected value. infix fun <E, T : Iterable<E>> Expect<T>.containsNot(values: Values<E>): Expect<T>
Expects that the subject of the assertion (an Iterable) has at least one element and that it does not contain the expected values. |
|
infix fun <K, T : Map<out K, *>> Expect<T>.containsNotKey(key: K): Expect<T>
Expects that the subject of the assertion (a Map) does not contain the given key. |
|
infix fun <K, V, T : Map<out K, V>> Expect<T>.containsOnly(keyValuePair: Pair<K, V>): Expect<T>
Expects that the subject of the assertion (a Map) contains only one entry with a key as defined by keyValuePair's Pair.first and a corresponding value as defined by keyValuePair's Pair.second infix fun <K, V, T : Map<out K, V>> Expect<T>.containsOnly(keyValuePairs: Pairs<K, V>): Expect<T>
Expects the subject of the assertion (a Map) contains only (in any order) for each entry in keyValuePairs, a key as defined by that entry's Pair.first with a corresponding value as defined by entry's Pair.second. infix fun <K, V : Any, T : Map<out K, V?>> Expect<T>.containsOnly(keyValue: KeyWithValueCreator<K, V>): Expect<T>
Expects that the subject of the assertion (a Map) contains only one entry with a key as defined by
keyValue's KeyWithValueCreator.key with a corresponding value which either holds all assertions keyValue's
KeyWithValueCreator.valueAssertionCreatorOrNull creates or needs to be infix fun <K, V : Any, T : Map<out K, V?>> Expect<T>.containsOnly(allKeyValues: KeyValues<K, V>): Expect<T>
Expects that the subject of the assertion (a Map) contains only (in any order) for each KeyWithValueCreator
in allKeyValues, a key as defined by KeyWithValueCreator.key with a corresponding value which either holds all
assertions KeyWithValueCreator's KeyWithValueCreator.valueAssertionCreatorOrNull creates or needs
to be |
|
infix fun <K, V : Any, T : Map<out K, V?>> Expect<T>.containsOnlyEntriesOf(mapLike: MapLike): Expect<T>
Expects that the subject of the assertion (a Map) contains only (in any order) the key-value pairs of the given mapLike. |
|
infix fun <T : CharSequence> Expect<T>.containsRegex(pattern: String): Expect<T>
Expects that the subject of the assertion (a CharSequence) contains a sequence which matches the given regular expression pattern. |
|
infix fun Expect<LocalDate>.day(assertionCreator: Expect<Int>.() -> Unit): Expect<LocalDate>
Expects that the property LocalDate.dayOfMonth of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. infix fun Expect<LocalDateTime>.day(assertionCreator: Expect<Int>.() -> Unit): Expect<LocalDateTime>
Expects that the property LocalDateTime.dayOfMonth of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. infix fun Expect<ZonedDateTime>.day(assertionCreator: Expect<Int>.() -> Unit): Expect<ZonedDateTime>
Expects that the property ZonedDateTime.dayOfMonth of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. |
|
infix fun Expect<LocalDate>.dayOfWeek(assertionCreator: Expect<DayOfWeek>.() -> Unit): Expect<LocalDate>
Expects that the property LocalDate.getDayOfWeek of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. infix fun Expect<LocalDateTime>.dayOfWeek(assertionCreator: Expect<DayOfWeek>.() -> Unit): Expect<LocalDateTime>
Expects that the property LocalDateTime.dayOfWeekof the subject of the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. infix fun Expect<ZonedDateTime>.dayOfWeek(assertionCreator: Expect<DayOfWeek>.() -> Unit): Expect<ZonedDateTime>
Expects that the property ZonedDatetime.dayOfWeek of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. |
|
fun directoryEntries(entry: String, vararg otherEntries: String): DirectoryEntries
Helper function for has to create DirectoryEntries with the provided entry and the otherEntries. |
|
infix fun <T : CharSequence> CharSequenceContains.CheckerStep<T, NoOpSearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T> infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, NoOpSearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.CheckerStep<T, IgnoringCaseSearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T> infix fun <T : CharSequence> CharSequenceContains.EntryPointStep<T, IgnoringCaseSearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T> infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, IgnoringCaseSearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T> infix fun <T : CharSequence> CharSequenceContains.Builder<T, IgnoringCaseSearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, NoOpSearchBehaviour>.elementsOf(expectedIterable: Iterable<CharSequenceOrNumberOrChar>): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, IgnoringCaseSearchBehaviour>.elementsOf(expectedIterable: Iterable<CharSequenceOrNumberOrChar>): Expect<T> infix fun <T : CharSequence> CharSequenceContains.Builder<T, IgnoringCaseSearchBehaviour>.elementsOf(expectedIterable: Iterable<CharSequenceOrNumberOrChar>): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T : Iterable<E>> IterableContains.CheckerOption<E, T, InAnyOrderSearchBehaviour>.elementsOf(expectedIterable: Iterable<E>): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T : Iterable<E>> IterableContains.CheckerOption<E, T, InAnyOrderSearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InAnyOrderOnlySearchBehaviour>.elementsOf(expectedIterable: Iterable<E>): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InAnyOrderOnlySearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InOrderOnlySearchBehaviour>.elementsOf(expectedIterable: Iterable<E>): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InOrderOnlySearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T> IterableLikeContains.CheckerStep<E, T, InAnyOrderSearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InAnyOrderOnlySearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlySearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T>
Finishes the specification of the sophisticated |
|
infix fun <T : CharSequence> Expect<T>.endsNotWith(expected: CharSequence): Expect<T> infix fun <T : CharSequence> Expect<T>.endsNotWith(expected: Char): Expect<T>
Expects that the subject of the assertion (a CharSequence) does not end with expected. infix 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; |
|
infix fun <T : CharSequence> Expect<T>.endsWith(expected: CharSequence): Expect<T> infix fun <T : CharSequence> Expect<T>.endsWith(expected: Char): Expect<T>
Expects that the subject of the assertion (a CharSequence) ends with expected. infix fun <T : Path> Expect<T>.endsWith(expected: Path): Expect<T>
Expects that the subject of the assertion (a Path) ends with the expected Path. |
|
fun <T : Any> entries(assertionCreatorOrNull: (Expect<T>.() -> Unit)?, vararg otherAssertionCreatorsOrNulls: (Expect<T>.() -> Unit)?): Entries<T>
Helper function to create an Entries based on the given assertionCreatorOrNull
and otherAssertionCreatorsOrNulls -- allows to express |
|
infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderSearchBehaviour>.entriesOf(expectedMapLike: MapLike): Expect<T>
Finishes the specification of the sophisticated infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderOnlySearchBehaviour>.entriesOf(expectedMapLike: MapLike): Expect<T>
Finishes the specification of the sophisticated infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InOrderOnlySearchBehaviour>.entriesOf(expectedMapLike: MapLike): Expect<T>
Finishes the specification of the sophisticated |
|
fun <T : Any> entry(assertionCreatorOrNull: (Expect<T>.() -> Unit)?): Entry<T>
Helper function to create an Entry based on the given assertionCreatorOrNull. infix fun <E : Any, T : Iterable<E?>> IterableContains.CheckerOption<E?, T, InAnyOrderSearchBehaviour>.entry(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>
Finishes the specification of the sophisticated infix fun <E : Any, T : Iterable<E?>> IterableContains.Builder<E?, T, InAnyOrderOnlySearchBehaviour>.entry(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>
Finishes the specification of the sophisticated infix fun <E : Any, T : Iterable<E?>> IterableContains.Builder<E?, T, InOrderOnlySearchBehaviour>.entry(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>
Finishes the specification of the sophisticated infix fun <E : Any, T> IterableLikeContains.CheckerStep<out E?, T, InAnyOrderSearchBehaviour>.entry(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>
Finishes the specification of the sophisticated infix fun <E : Any, T> IterableLikeContains.EntryPointStep<out E?, T, InAnyOrderOnlySearchBehaviour>.entry(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T> infix fun <E : Any, T> IterableLikeContains.EntryPointStep<out E?, T, InOrderOnlySearchBehaviour>.entry(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>
Finishes the specification of the sophisticated infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderSearchBehaviour>.entry(keyValuePair: Pair<K, V>): Expect<T>
Finishes the specification of the sophisticated infix fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InAnyOrderSearchBehaviour>.entry(keyValue: KeyWithValueCreator<K, V>): Expect<T>
Finishes the specification of the sophisticated infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderOnlySearchBehaviour>.entry(keyValuePair: Pair<K, V>): Expect<T> infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InOrderOnlySearchBehaviour>.entry(keyValuePair: Pair<K, V>): Expect<T>
Finishes the specification of the sophisticated infix fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InAnyOrderOnlySearchBehaviour>.entry(keyValue: KeyWithValueCreator<K, V>): Expect<T> infix fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InOrderOnlySearchBehaviour>.entry(keyValue: KeyWithValueCreator<K, V>): Expect<T>
Finishes the specification of the sophisticated |
|
infix fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.EntryPointStep<T, S>.exactly(times: Int): ExactlyCheckerStep<T, S> infix fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.Builder<T, S>.exactly(times: Int): ExactlyCheckerOption<T, S>
Restricts a infix fun <E, T : Iterable<E>, S : InAnyOrderSearchBehaviour> IterableContains.Builder<E, T, S>.exactly(times: Int): ExactlyCheckerOption<E, T, S>
Restricts a infix fun <E, T, S : InAnyOrderSearchBehaviour> IterableLikeContains.EntryPointStep<E, T, S>.exactly(times: Int): ExactlyCheckerStep<E, T, S>
Restricts a |
|
infix 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 an Expect for the current subject of the assertion. |
|
fun <T, R> MetaFeatureOption<T>.f(description: String, provider: R): MetaFeature<R>
Creates a MetaFeature using the given provider and description. |
|
infix fun <T, R> Expect<T>.feature(property: KProperty1<in T, R>): FeatureExpect<T, R>
Extracts the property out of the current subject of the assertion, creates a new Expect for it and returns it so that subsequent calls are based on the feature. infix fun <T, R> Expect<T>.feature(f: KFunction1<T, R>): FeatureExpect<T, R>
Extracts the value which is returned when calling the method f on the current subject of the assertion, creates a new Expect for it and returns it so that subsequent calls are based on the feature. infix fun <T, R> Expect<T>.feature(of: Feature<in T, R>): FeatureExpect<T, R>
Extracts a feature out of the current subject of the assertion using the given Feature.extractor, creates a new Expect for it and returns it so that subsequent calls are based on the feature. infix fun <T, R> Expect<T>.feature(of: FeatureWithCreator<in T, R>): Expect<T>
Extracts a feature out of the current subject of the assertion using the given FeatureWithCreator.extractor, creates a new Expect for it, applies an assertion group based on the given FeatureWithCreator.assertionCreator for the feature and returns the initial Expect with the current subject. infix fun <T, R> Expect<T>.feature(provider: MetaFeatureOption<T>.(T) -> MetaFeature<R>): FeatureExpect<T, R>
Extracts a feature out of the current subject of the assertion, based on the given provider, creates a new Expect for it and returns it so that subsequent calls are based on the feature. infix fun <T, R> Expect<T>.feature(of: MetaFeatureOptionWithCreator<T, R>): Expect<T>
Extracts a feature out of the current subject of the assertion, based on the given MetaFeatureOptionWithCreator creates a new Expect for it, applies an assertion group based on the given MetaFeatureOptionWithCreator.assertionCreator for the feature and returns the initial Expect with the current subject. |
|
infix 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 an Expect for the current subject of the assertion. |
|
infix 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 an Expect for the current subject of the assertion. |
|
infix 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 the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. |
|
infix 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 the assertion (a List) and returns an Expect for the element at that position. infix fun <E, T : List<E>> Expect<T>.get(index: IndexWithCreator<E>): Expect<T>
Expects that the given index is within the bounds of the subject of the assertion (a List) and that the element at that position holds all assertions the given IndexWithCreator.assertionCreator creates for it. |
|
infix fun <K, V, T : Map<out K, V>> Expect<T>.getExisting(key: K): Expect<V>
Expects that the subject of the assertion (a Map) contains the given key, creates an Expect for the corresponding value and returns the newly created assertion container, so that further fluent calls are assertions about it. infix fun <K, V, T : Map<out K, V>> Expect<T>.getExisting(key: KeyWithCreator<K, V>): Expect<T>
Expects that the subject of the assertion (a Map) contains the given key and that the corresponding value holds all assertions the given KeyWithCreator.assertionCreator creates for it. |
|
infix fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InOrderOnlySearchBehaviour>.grouped(entries: entries): IterableContains.Builder<E, T, InOrderOnlyGroupedSearchBehaviour>
Defines that the Iterable contains infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlySearchBehaviour>.grouped(entries: entries): IterableLikeContains.EntryPointStep<E, T, InOrderOnlyGroupedSearchBehaviour>
Defines that the IterableLike contains |
|
infix fun <E, T : Iterable<E>> Expect<T>.has(next: next): Expect<T>
Expects that the subject of the assertion (an Iterable) has at least one element. infix fun <T : Path> Expect<T>.has(directoryEntries: DirectoryEntries): Expect<T>
Expects that the subject of the assertion (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. |
|
infix fun <T : Path> Expect<T>.hasDirectoryEntry(entry: String): Expect<T>
Expects that the subject of the assertion (a Path) is a directory having the provided entry. That means that there is a file system entry at the location the Path points to and that it is a directory. Furthermore, the argument string resolved against the subject yields an existing file system entry. |
|
infix fun <E, T : Iterable<E>> Expect<T>.hasNot(next: next): Expect<T>
Expects that the subject of the assertion (an Iterable) does not have next element. |
|
infix fun <T : Path> Expect<T>.hasSameBinaryContentAs(targetPath: Path): Expect<T>
Expects that the subject of the assertion (a Path) has the same binary content as targetPath. |
|
infix fun <T : Path> Expect<T>.hasSameTextualContentAs(targetPath: Path): Expect<T>
Expects that the subject of the assertion (a Path) has the same textual content as targetPath (using UTF-8 for encoding) infix fun <T : Path> Expect<T>.hasSameTextualContentAs(pathWithEncoding: PathWithEncoding): Expect<T>
Expects that the subject of the assertion (a Path) has the same textual content as PathWithEncoding.path in the given pathWithEncoding with the specified encodings. |
|
infix fun <T : Collection<*>> Expect<T>.hasSize(expected: Int): Expect<T>
Expects that the subject of the assertion (a Collection) has the given expected size. |
|
infix fun <T : CharSequence> CharSequenceContains.EntryPointStep<T, NoOpSearchBehaviour>.ignoring(case: case): CharSequenceContains.EntryPointStep<T, IgnoringCaseSearchBehaviour> infix fun <T : CharSequence> CharSequenceContains.Builder<T, NoOpSearchBehaviour>.ignoring(case: case): CharSequenceContains.Builder<T, IgnoringCaseSearchBehaviour>
Defines that the search behaviour infix fun <T : CharSequence> NotCheckerStep<T, NotSearchBehaviour>.ignoring(case: case): NotCheckerStep<T, IgnoringCaseSearchBehaviour> infix fun <T : CharSequence> NotCheckerOption<T, NotSearchBehaviour>.ignoring(case: case): NotCheckerOption<T, IgnoringCaseSearchBehaviour>
Defines that the search behaviour |
|
infix fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InOrderOnlyGroupedWithinSearchBehaviour>.inAny(order: Order<E, Group<E>>): Expect<T>
Finishes the specification of the sophisticated infix fun <E : Any, T : Iterable<E?>> IterableContains.Builder<E?, T, InOrderOnlyGroupedWithinSearchBehaviour>.inAny(order: Order<(Expect<E>.() -> Unit)?, Group<(Expect<E>.() -> Unit)?>>): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T : Iterable<E>> IterableContains.Builder<E, T, NoOpSearchBehaviour>.inAny(order: order): IterableContains.Builder<E, T, InAnyOrderSearchBehaviour>
Defines that the search behaviour "find entries infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlyGroupedWithinSearchBehaviour>.inAny(order: Order<E, Group<E>>): Expect<T>
Finishes the specification of the sophisticated infix fun <E : Any, T> IterableLikeContains.EntryPointStep<out E?, T, InOrderOnlyGroupedWithinSearchBehaviour>.inAny(order: Order<(Expect<E>.() -> Unit)?, Group<(Expect<E>.() -> Unit)?>>): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, NoOpSearchBehaviour>.inAny(order: order): IterableLikeContains.EntryPointStep<E, T, InAnyOrderSearchBehaviour>
Defines that the search behaviour "find entries infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, NoOpSearchBehaviour>.inAny(order: order): MapLikeContains.EntryPointStep<K, V, T, InAnyOrderSearchBehaviour>
Defines that the search behaviour "find entries |
|
fun <E> index(index: Int, assertionCreator: Expect<E>.() -> Unit): IndexWithCreator<E>
Helper function to create an IndexWithCreator based on the given index and assertionCreator. |
|
infix fun <E, T : Iterable<E>> IterableContains.Builder<E, T, NoOpSearchBehaviour>.inGiven(order: order): IterableContains.Builder<E, T, InOrderSearchBehaviour>
Defines that the search behaviour "find entries infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, NoOpSearchBehaviour>.inGiven(order: order): IterableLikeContains.EntryPointStep<E, T, InOrderSearchBehaviour>
Defines that the search behaviour "find entries infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, NoOpSearchBehaviour>.inGiven(order: order): MapLikeContains.EntryPointStep<K, V, T, InOrderSearchBehaviour>
Defines that the search behaviour "find entries |
|
fun <TSub : Any> Expect<*>.isA(): Expect<TSub>
Expects that the subject of the assertion is a TSub (the same type or a sub-type) and changes the subject to this type. infix fun <TSub : Any> Expect<*>.isA(assertionCreator: Expect<TSub>.() -> Unit): Expect<TSub>
Expects that the subject of the assertion is a TSub (the same type or a sub-type) and that it holds all assertions the given assertionCreator creates. |
|
infix fun <T : ChronoLocalDate> Expect<T>.isAfter(expected: ChronoLocalDate): Expect<T>
Expects that the subject of the assertion (a ChronoLocalDate) is after the expected. infix fun <T : ChronoLocalDate> Expect<T>.isAfter(expected: String): Expect<T>
Expects that the subject of the assertion (a ChronoLocalDate) is after the expected given as String. The expected parameter needs to be in the form of yyyy-mm-dd or else a java.time.DateTimeException will be thrown. infix 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. infix 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. |
|
infix 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. infix fun <T : ChronoLocalDate> Expect<T>.isAfterOrEqual(expected: String): Expect<T>
Expects that the subject of the assertion (a ChronoLocalDate) is after or equal the expected given as String. The expected parameter needs to be in the form of yyyy-mm-dd or else a java.time.DateTimeException will be thrown. infix 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. infix 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. |
|
infix fun <T : ChronoLocalDate> Expect<T>.isBefore(expected: ChronoLocalDate): Expect<T>
Expects that the subject of the assertion (a ChronoLocalDate) is before the expected. infix fun <T : ChronoLocalDate> Expect<T>.isBefore(expected: String): Expect<T>
Expects that the subject of the assertion (a ChronoLocalDate) is before the expected given as String. The expected parameter needs to be in the form of yyyy-mm-dd or else a java.time.DateTimeException will be thrown. infix 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. infix 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. |
|
infix 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. infix fun <T : ChronoLocalDate> Expect<T>.isBeforeOrEqual(expected: String): Expect<T>
Expects that the subject of the assertion (a ChronoLocalDate) is before or equal the expected given as String. The expected parameter needs to be in the form of yyyy-mm-dd or else a java.time.DateTimeException will be thrown. infix 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. infix 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. |
|
infix fun <T : ChronoLocalDate> Expect<T>.isEqual(expected: ChronoLocalDate): Expect<T>
Expects that the subject of the assertion (a ChronoLocalDate) is equal to the expected. infix fun <T : ChronoLocalDate> Expect<T>.isEqual(expected: String): Expect<T>
Expects that the subject of the assertion (a ChronoLocalDate) is equal to the expected given as String. The expected parameter needs to be in the form of yyyy-mm-dd or else a java.time.DateTimeException will be thrown. infix 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. infix 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. |
|
infix fun <T : Comparable<T>> Expect<T>.isEqualComparingTo(expected: T): Expect<T>
Expects that the subject of the assertion is equal to expected where the comparison is carried out with Comparable.compareTo. |
|
infix fun <T : BigDecimal> Expect<T>.isEqualIncludingScale(expected: T): Expect<T>
Expects that the subject of the assertion (a BigDecimal) is equal to expected including BigDecimal.scale. |
|
infix fun <T : Comparable<T>> Expect<T>.isGreaterThan(expected: T): Expect<T>
Expects that the subject of the assertion is greater than expected. The comparison is carried out with Comparable.compareTo. |
|
infix fun <T : Comparable<T>> Expect<T>.isGreaterThanOrEqual(expected: T): Expect<T>
Expects that the subject of the assertion is greater than or equal expected. The comparison is carried out with Comparable.compareTo. |
|
infix fun <K, V, T : Entry<K, V>> Expect<T>.isKeyValue(keyValuePair: Pair<K, V>): Expect<T>
Expects that the property Map.Entry.key of the subject of the assertion is equal to the given key and the property Map.Entry.value is equal to the given value. |
|
infix fun <T : Comparable<T>> Expect<T>.isLessThan(expected: T): Expect<T>
Expects that the subject of the assertion is less than expected. The comparison is carried out with Comparable.compareTo. |
|
infix fun <T : Comparable<T>> Expect<T>.isLessThanOrEqual(expected: T): Expect<T>
Expects that the subject of the assertion is less than or equal expected. The comparison is carried out with Comparable.compareTo. |
|
infix fun <T> Expect<T>.isNoneOf(values: Values<T>): Expect<T>
Expects that the subject of the assertion is not (equal to) in values. |
|
infix fun <T : BigDecimal> Expect<T>.isNotEqualIncludingScale(expected: T): Expect<T>
Expects that the subject of the assertion (a BigDecimal) is not equal to expected including BigDecimal.scale. |
|
infix fun <T> Expect<T>.isNotIn(expected: IterableLike): Expect<T>
Expects that the subject of the assertion is not (equal to) any value of expected. |
|
infix fun <T : BigDecimal> Expect<T>.isNotNumericallyEqualTo(expected: T): Expect<T>
Expects that the subject of the assertion (a BigDecimal) is not numerically equal to expected. |
|
infix fun <T> Expect<T>.isNotSameAs(expected: T): Expect<T>
Expects that the subject of the assertion is not the same instance as expected. |
|
infix fun <T : BigDecimal> Expect<T>.isNumericallyEqualTo(expected: T): Expect<T>
Expects that the subject of the assertion (a BigDecimal) is numerically equal to expected. |
|
infix fun <T> Expect<T>.isSameAs(expected: T): Expect<T>
Expects that the subject of the assertion is the same instance as expected. |
|
fun <K, V> key(key: K, assertionCreator: Expect<V>.() -> Unit): KeyWithCreator<K, V>
Helper function to create an KeyWithCreator based on the given key and assertionCreator. infix fun <K, V, T : Entry<K, V>> Expect<T>.key(assertionCreator: Expect<K>.() -> Unit): Expect<T>
Expects that the property Map.Entry.key of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. |
|
infix 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 the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. |
|
fun <K, V : Any> keyValue(key: K, valueAssertionCreatorOrNull: (Expect<V>.() -> Unit)?): KeyWithValueCreator<K, V>
Helper function to create a KeyWithValueCreator based on the given key and valueAssertionCreatorOrNull
-- allows to express |
|
fun <K, V : Any> keyValues(keyValue: KeyWithValueCreator<K, V>, vararg otherKeyValues: KeyWithValueCreator<K, V>): KeyValues<K, V>
Helper function to create a KeyValues based on the given keyValue and otherKeyValues
-- allows to express |
|
infix fun <T : CharSequence> Expect<T>.matches(expected: Regex): Expect<T>
Expects that the subject of the assertion (a CharSequence) matches the given expected. |
|
infix fun <T : CharSequence> CharSequenceContains.CheckerStep<T, NoOpSearchBehaviour>.matchFor(pattern: Regex): Expect<T> infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, NoOpSearchBehaviour>.matchFor(pattern: Regex): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.CheckerStep<T, NoOpSearchBehaviour>.matchFor(patterns: All<Regex>): Expect<T> infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, NoOpSearchBehaviour>.matchFor(patterns: All<Regex>): Expect<T>
Finishes the specification of the sophisticated |
|
infix fun <E : Comparable<E>, T : Iterable<E>> Expect<T>.max(o: o): Expect<E>
Creates an Expect for the result of calling infix fun <E : Comparable<E>, T : Iterable<E>> Expect<T>.max(assertionCreator: Expect<E>.() -> Unit): Expect<T>
Expects that the result of calling |
|
infix fun <T : Throwable> Expect<T>.message(assertionCreator: Expect<String>.() -> Unit): Expect<T>
Expects that the property Throwable.message of the subject of the assertion is not null and holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. |
|
infix fun <T : Throwable> Expect<T>.messageContains(expected: CharSequenceOrNumberOrChar): Expect<T>
Expects that the property Throwable.message of the subject of the assertion is not null and contains expected's toString representation using a non disjoint search. infix fun <T : Throwable> Expect<T>.messageContains(values: Values<Any>): Expect<T>
Expects that the property Throwable.message of the subject of the assertion is not null and contains values's toString representation using a non disjoint search. |
|
infix fun <E : Comparable<E>, T : Iterable<E>> Expect<T>.min(o: o): Expect<E>
Creates an Expect for the result of calling infix fun <E : Comparable<E>, T : Iterable<E>> Expect<T>.min(assertionCreator: Expect<E>.() -> Unit): Expect<T>
Expects that the result of calling |
|
infix fun <T : CharSequence> Expect<T>.mismatches(expected: Regex): Expect<T>
Expects that the subject of the assertion (a CharSequence) mismatches the given expected. |
|
infix fun Expect<LocalDate>.month(assertionCreator: Expect<Int>.() -> Unit): Expect<LocalDate>
Expects that the property LocalDate.monthValue of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. infix fun Expect<LocalDateTime>.month(assertionCreator: Expect<Int>.() -> Unit): Expect<LocalDateTime>
Expects that the property LocalDateTime.monthValueof the subject of the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. infix fun Expect<ZonedDateTime>.month(assertionCreator: Expect<Int>.() -> Unit): Expect<ZonedDateTime>
Expects that the property ZonedDateTime.monthValue of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. |
|
infix fun <E : Any, T : Iterable<E?>> Expect<T>.none(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>
Expects that the subject of the assertion (an Iterable) has at least one element and
that it either does not contain a single entry which holds all assertions created by assertionCreatorOrNull or
that it does not contain a single entry which is |
|
infix fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.EntryPointStep<T, S>.notOrAtMost(times: Int): NotOrAtMostCheckerStep<T, S> infix fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.Builder<T, S>.notOrAtMost(times: Int): NotOrAtMostCheckerOption<T, S>
Restricts a infix fun <E, T : Iterable<E>, S : InAnyOrderSearchBehaviour> IterableContains.Builder<E, T, S>.notOrAtMost(times: Int): NotOrAtMostCheckerOption<E, T, S>
Restricts a infix fun <E, T, S : InAnyOrderSearchBehaviour> IterableLikeContains.EntryPointStep<E, T, S>.notOrAtMost(times: Int): NotOrAtMostCheckerStep<E, T, S>
Restricts a |
|
infix fun <T> Expect<T>.notToBe(expected: T): Expect<T>
Expects that the subject of the assertion is not (equal to) expected. infix fun <T : CharSequence> Expect<T>.notToBe(empty: empty): Expect<T>
Expects that the subject of the assertion (a CharSequence) CharSequence.kotlin.text.isNotEmpty. infix fun <T : CharSequence> Expect<T>.notToBe(blank: blank): Expect<T>
Expects that the subject of the assertion (a CharSequence) CharSequence.kotlin.text.isNotBlank. infix fun <T : Path> Expect<T>.notToBe(existing: existing): 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. |
|
infix fun <T : Any> Expect<T?>.notToBeNull(o: o): Expect<T>
Expects that the subject of the assertion is not null and changes the subject to the non-nullable version. infix fun <T : Any> Expect<T?>.notToBeNull(assertionCreator: Expect<T>.() -> Unit): Expect<T>
Expects that the subject of the assertion is not null and that it holds all assertions the given assertionCreator creates. |
|
fun <R, T : () -> R> Expect<T>.notToThrow(): Expect<R>
Expects that no Throwable is thrown at all when calling the subject (a lambda with arity 0, i.e. without arguments) and changes the subject of the assertion to the return value of type R. infix fun <R, T : () -> R> Expect<T>.notToThrow(assertionCreator: Expect<R>.() -> Unit): Expect<R>
Expects that no Throwable is thrown at all when calling the subject (a lambda with arity 0, i.e. without arguments) and that the corresponding return value holds all assertions the given assertionCreator creates. |
|
fun <T> of(reason: String, assertionCreator: Expect<T>.() -> Unit): KeyWithCreator<String, T>
Helper function to create a KeyWithCreator based on the given reason and assertionCreator. fun <T, A1, R> of(f: KFunction2<T, A1, R>, a1: A1): Feature<T, R>
Helper function to create a Feature based on a KFunction2 + arguments. fun <T, A1, A2, R> of(f: KFunction3<T, A1, A2, R>, a1: A1, a2: A2): Feature<T, R>
Helper function to create a Feature based on a KFunction3 + arguments. fun <T, A1, A2, A3, R> of(f: KFunction4<T, A1, A2, A3, R>, a1: A1, a2: A2, a3: A3): Feature<T, R>
Helper function to create a Feature based on a KFunction4 + arguments. fun <T, A1, A2, A3, A4, R> of(f: KFunction5<T, A1, A2, A3, A4, R>, a1: A1, a2: A2, a3: A3, a4: A4): Feature<T, R>
Helper function to create a Feature based on a KFunction5 + arguments. fun <T, A1, A2, A3, A4, A5, R> of(f: KFunction6<T, A1, A2, A3, A4, A5, R>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): Feature<T, R>
Helper function to create a Feature based on a KFunction6 + arguments. fun <T, R> of(property: KProperty1<in T, R>, assertionCreator: Expect<R>.() -> Unit): FeatureWithCreator<T, R>
Helper function to create a FeatureWithCreator based on a KProperty1 + assertionCreator. fun <T, R> of(f: KFunction1<T, R>, assertionCreator: Expect<R>.() -> Unit): FeatureWithCreator<T, R>
Helper function to create a FeatureWithCreator based on a KFunction1 + assertionCreator. fun <T, A1, R> of(f: KFunction2<T, A1, R>, a1: A1, assertionCreator: Expect<R>.() -> Unit): FeatureWithCreator<T, R>
Helper function to create a FeatureWithCreator based on a KFunction2 + arguments + assertionCreator. fun <T, A1, A2, R> of(f: KFunction3<T, A1, A2, R>, a1: A1, a2: A2, assertionCreator: Expect<R>.() -> Unit): FeatureWithCreator<T, R>
Helper function to create a FeatureWithCreator based on a KFunction3 + arguments + assertionCreator. fun <T, A1, A2, A3, R> of(f: KFunction4<T, A1, A2, A3, R>, a1: A1, a2: A2, a3: A3, assertionCreator: Expect<R>.() -> Unit): FeatureWithCreator<T, R>
Helper function to create a FeatureWithCreator based on a KFunction4 + arguments + assertionCreator. fun <T, A1, A2, A3, A4, R> of(f: KFunction5<T, A1, A2, A3, A4, R>, a1: A1, a2: A2, a3: A3, a4: A4, assertionCreator: Expect<R>.() -> Unit): FeatureWithCreator<T, R>
Helper function to create a FeatureWithCreator based on a KFunction5 + arguments + assertionCreator. fun <T, A1, A2, A3, A4, A5, R> of(f: KFunction6<T, A1, A2, A3, A4, A5, R>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, assertionCreator: Expect<R>.() -> Unit): FeatureWithCreator<T, R>
Helper function to create a FeatureWithCreator based on a KFunction6 + arguments + assertionCreator. fun <T, R> of(provider: MetaFeatureOption<T>.(T) -> MetaFeature<R>, assertionCreator: Expect<R>.() -> Unit): MetaFeatureOptionWithCreator<T, R>
Helper function to create a MetaFeatureOptionWithCreator based on a lambda with MetaFeatureOption receiver (has to return a MetaFeature) and an assertionCreator. fun <T, R> of(description: String, extractor: T.() -> R): Feature<T, R> fun <T, R> of(description: String, extractor: T.() -> R, assertionCreator: Expect<R>.() -> Unit): FeatureWithCreator<T, R>
Creates a Feature using the given extractor and description. |
|
fun <E> order(firstGroup: Group<E>, secondGroup: Group<E>, vararg otherExpectedGroups: Group<E>): Order<E, Group<E>>
Helper function to create an Order based on the given firstGroup, secondGroup and otherExpectedGroups. |
|
fun <K, V> pairs(pair: Pair<K, V>, vararg otherPairs: Pair<K, V>): Pairs<K, V>
Helper function to create a Pairs based on the given pair and otherPairs
-- allows to express |
|
infix 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 the assertion. |
|
fun <E> path(path: String, assertionCreator: Expect<E>.() -> Unit): PathWithCreator<E>
Helper function to create a PathWithCreator based on the given path and assertionCreator. |
|
fun <E> present(assertionCreator: Expect<E>.() -> Unit): PresentWithCreator<E>
Helper function to create a PresentWithCreator based on the given assertionCreator. |
|
infix fun <T : CharSequence> CharSequenceContains.CheckerStep<T, NoOpSearchBehaviour>.regex(pattern: String): Expect<T> infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, NoOpSearchBehaviour>.regex(pattern: String): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.CheckerStep<T, IgnoringCaseSearchBehaviour>.regex(pattern: String): Expect<T> infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, IgnoringCaseSearchBehaviour>.regex(pattern: String): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.EntryPointStep<T, IgnoringCaseSearchBehaviour>.regex(pattern: String): Expect<T> infix fun <T : CharSequence> CharSequenceContains.Builder<T, IgnoringCaseSearchBehaviour>.regex(pattern: String): Expect<T>
Finishes the specification of the sophisticated |
|
fun regexPatterns(pattern: String, vararg otherPatterns: String): RegexPatterns
Helper function to create a RegexPatterns based on the given pattern and otherPatterns
-- allows to express |
|
infix 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. infix fun <T : Path> Expect<T>.resolve(path: PathWithCreator<Path>): Expect<T>
Expects that PathWithCreator.path resolves against this Path, that the resolved Path holds all assertions the given PathWithCreator.assertionCreator creates for it and returns an Expect for the current subject of the assertion. |
|
infix 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 the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. |
|
infix fun <E, T : Collection<E>> Expect<T>.size(assertionCreator: Expect<Int>.() -> Unit): Expect<T>
Expects that the property Collection.size of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. |
|
infix fun <T : CharSequence> Expect<T>.startsNotWith(expected: CharSequence): Expect<T> infix fun <T : CharSequence> Expect<T>.startsNotWith(expected: Char): Expect<T>
Expects that the subject of the assertion (a CharSequence) does not start with expected. infix 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. |
|
infix fun <T : CharSequence> Expect<T>.startsWith(expected: CharSequence): Expect<T> infix fun <T : CharSequence> Expect<T>.startsWith(expected: Char): Expect<T>
Expects that the subject of the assertion (a CharSequence) starts with expected. infix fun <T : Path> Expect<T>.startsWith(expected: Path): Expect<T>
Expects that the subject of the assertion (a Path) starts with the expected. |
|
fun <E> success(assertionCreator: Expect<E>.() -> Unit): SuccessWithCreator<E>
Helper function to create a SuccessWithCreator based on the given assertionCreator. |
|
infix fun <T : CharSequence> CharSequenceContains.CheckerStep<T, NoOpSearchBehaviour>.the(values: Values<CharSequenceOrNumberOrChar>): Expect<T> infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, NoOpSearchBehaviour>.the(values: Values<CharSequenceOrNumberOrChar>): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.CheckerStep<T, IgnoringCaseSearchBehaviour>.the(values: Values<CharSequenceOrNumberOrChar>): Expect<T> infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, IgnoringCaseSearchBehaviour>.the(values: Values<CharSequenceOrNumberOrChar>): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.EntryPointStep<T, IgnoringCaseSearchBehaviour>.the(values: Values<CharSequenceOrNumberOrChar>): Expect<T> infix fun <T : CharSequence> CharSequenceContains.Builder<T, IgnoringCaseSearchBehaviour>.the(values: Values<CharSequenceOrNumberOrChar>): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.CheckerStep<T, NoOpSearchBehaviour>.the(patterns: RegexPatterns): Expect<T> infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, NoOpSearchBehaviour>.the(patterns: RegexPatterns): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.CheckerStep<T, IgnoringCaseSearchBehaviour>.the(patterns: RegexPatterns): Expect<T> infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, IgnoringCaseSearchBehaviour>.the(patterns: RegexPatterns): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.EntryPointStep<T, IgnoringCaseSearchBehaviour>.the(patterns: RegexPatterns): Expect<T> infix fun <T : CharSequence> CharSequenceContains.Builder<T, IgnoringCaseSearchBehaviour>.the(patterns: RegexPatterns): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T : Iterable<E>> IterableContains.CheckerOption<E, T, InAnyOrderSearchBehaviour>.the(values: Values<E>): Expect<T>
Finishes the specification of the sophisticated infix fun <E : Any, T : Iterable<E?>> IterableContains.CheckerOption<E?, T, InAnyOrderSearchBehaviour>.the(entries: Entries<E>): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InAnyOrderOnlySearchBehaviour>.the(values: Values<E>): Expect<T>
Finishes the specification of the sophisticated infix fun <E : Any, T : Iterable<E?>> IterableContains.Builder<E?, T, InAnyOrderOnlySearchBehaviour>.the(entries: Entries<E>): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InOrderOnlySearchBehaviour>.the(values: Values<E>): Expect<T>
Finishes the specification of the sophisticated infix fun <E : Any, T : Iterable<E?>> IterableContains.Builder<E?, T, InOrderOnlySearchBehaviour>.the(entries: Entries<E>): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T> IterableLikeContains.CheckerStep<E, T, InAnyOrderSearchBehaviour>.the(values: Values<E>): Expect<T>
Finishes the specification of the sophisticated infix fun <E : Any, T> IterableLikeContains.CheckerStep<out E?, T, InAnyOrderSearchBehaviour>.the(entries: Entries<E>): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InAnyOrderOnlySearchBehaviour>.the(values: Values<E>): Expect<T>
Finishes the specification of the sophisticated infix fun <E : Any, T> IterableLikeContains.EntryPointStep<out E?, T, InAnyOrderOnlySearchBehaviour>.the(entries: Entries<E>): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlySearchBehaviour>.the(values: Values<E>): Expect<T>
Finishes the specification of the sophisticated infix fun <E : Any, T> IterableLikeContains.EntryPointStep<out E?, T, InOrderOnlySearchBehaviour>.the(entries: Entries<E>): Expect<T>
Finishes the specification of the sophisticated infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderSearchBehaviour>.the(pairs: Pairs<K, V>): Expect<T>
Finishes the specification of the sophisticated infix fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InAnyOrderSearchBehaviour>.the(keyValues: KeyValues<K, V>): Expect<T>
Finishes the specification of the sophisticated infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderOnlySearchBehaviour>.the(keyValuePairs: Pairs<K, V>): Expect<T>
Finishes the specification of the sophisticated infix fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InAnyOrderOnlySearchBehaviour>.the(keyValues: KeyValues<K, V>): Expect<T>
Finishes the specification of the sophisticated infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InOrderOnlySearchBehaviour>.the(keyValuePairs: Pairs<K, V>): Expect<T>
Finishes the specification of the sophisticated infix fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InOrderOnlySearchBehaviour>.the(keyValues: KeyValues<K, V>): Expect<T>
Finishes the specification of the sophisticated |
|
infix fun <T> Expect<T>.toBe(expected: T): Expect<T>
Expects that the subject of the assertion is (equal to) expected. infix fun <T : CharSequence> Expect<T>.toBe(empty: empty): Expect<T>
Expects that the subject of the assertion (a CharSequence) CharSequence.kotlin.text.isEmpty. infix fun <T : BigDecimal> Expect<T?>.toBe(expected: Nothing?): Expect<T?>
Expects that the subject of the assertion (a BigDecimal) is infix fun <E, T : Optional<E>> Expect<T>.toBe(present: present): FeatureExpect<T, E>
Expects that the subject of the assertion (an Optional) is present and returns an Expect for the inner type E. infix fun <E, T : Optional<E>> Expect<T>.toBe(present: PresentWithCreator<E>): Expect<T>
Expects that the subject of the assertion (an Optional) is present and that it holds all assertions the given PresentWithCreator.assertionCreator creates. infix fun <T : Path> Expect<T>.toBe(existing: existing): 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. infix fun <T : Path> Expect<T>.toBe(readable: readable): 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. infix fun <T : Path> Expect<T>.toBe(writable: writable): 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. infix fun <T : Path> Expect<T>.toBe(executable: executable): Expect<T>
Expects that the subject of the assertion (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. infix fun <T : Path> Expect<T>.toBe(aRegularFile: aRegularFile): 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. infix fun <T : Path> Expect<T>.toBe(aDirectory: aDirectory): 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. infix fun <T : Path> Expect<T>.toBe(absolute: absolute): Expect<T>
Expects that the subject of the assertion (a Path) is an absolute path; meaning that the Path specified in this instance starts at the file system root. infix fun <T : Path> Expect<T>.toBe(relative: relative): Expect<T>
Expects that the subject of the assertion (a Path) is a relative path; meaning that the Path specified in this instance does not start at the file system root. |
|
infix fun <T : Any> Expect<T?>.toBeNullIfNullGivenElse(assertionCreatorOrNull: (Expect<T>.() -> Unit)?): Expect<T?>
Expects that the subject of the assertion is either |
|
fun <TExpected : Throwable> Expect<() -> Any?>.toThrow(): Expect<TExpected>
Expects that the thrown Throwable is a TExpected (the same type or a sub-type). infix fun <TExpected : Throwable> Expect<() -> Any?>.toThrow(assertionCreator: Expect<TExpected>.() -> Unit): Expect<TExpected>
Expects that the thrown Throwable is a TExpected (the same type or a sub-type) and that it holds all assertions the given assertionCreator creates. |
|
infix fun <T : CharSequence> CharSequenceContains.CheckerStep<T, NoOpSearchBehaviour>.value(expected: CharSequenceOrNumberOrChar): Expect<T> infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, NoOpSearchBehaviour>.value(expected: CharSequenceOrNumberOrChar): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.CheckerStep<T, IgnoringCaseSearchBehaviour>.value(expected: CharSequenceOrNumberOrChar): Expect<T> infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, IgnoringCaseSearchBehaviour>.value(expected: CharSequenceOrNumberOrChar): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.EntryPointStep<T, IgnoringCaseSearchBehaviour>.value(expected: CharSequenceOrNumberOrChar): Expect<T> infix fun <T : CharSequence> CharSequenceContains.Builder<T, IgnoringCaseSearchBehaviour>.value(expected: CharSequenceOrNumberOrChar): Expect<T>
Finishes the specification of the sophisticated fun <T> value(value: T): Value<T>
Helper function to create a Value based on the given value. infix fun <E, T : Iterable<E>> IterableContains.CheckerOption<E, T, InAnyOrderSearchBehaviour>.value(expected: E): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InAnyOrderOnlySearchBehaviour>.value(expected: E): Expect<T> infix fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InOrderOnlySearchBehaviour>.value(expected: E): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T> IterableLikeContains.CheckerStep<E, T, InAnyOrderSearchBehaviour>.value(expected: E): Expect<T>
Finishes the specification of the sophisticated infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InAnyOrderOnlySearchBehaviour>.value(expected: E): Expect<T> infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlySearchBehaviour>.value(expected: E): Expect<T>
Finishes the specification of the sophisticated infix fun <K, V, T : Entry<K, V>> Expect<T>.value(assertionCreator: Expect<V>.() -> Unit): Expect<T>
Expects that the property Map.Entry.value of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. |
|
fun <T> values(value: T, vararg otherValues: T): Values<T>
Helper function to create a Values based on the given value and otherValues
-- allows to express infix 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 the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. |
|
fun withEncoding(path: Path, sourceCharset: Charset = Charsets.UTF_8, targetCharset: Charset = Charsets.UTF_8): PathWithEncoding
Helper function to create a PathWithEncoding based on the given path and the sourceCharset and targetCharset where UTF-8 is used as default if one encoding is missing. |
|
infix fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InOrderOnlyGroupedSearchBehaviour>.within(group: group): IterableContains.Builder<E, T, InOrderOnlyGroupedWithinSearchBehaviour> infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlyGroupedSearchBehaviour>.within(group: group): IterableLikeContains.EntryPointStep<E, T, InOrderOnlyGroupedWithinSearchBehaviour>
A filler word to emphasis that the next step defines the order within expected groups of values. |
|
infix fun <T> RootExpect<T>.withOptions(configuration: ExpectBuilder.OptionsChooser<T>.() -> Unit): Expect<T>
Uses the given configuration-lambda to create an ExpectOptions which in turn is used to override (parts) of the existing configuration. infix fun <T> RootExpect<T>.withOptions(options: ExpectOptions<T>): Expect<T> infix fun <T, R> FeatureExpect<T, R>.withOptions(options: FeatureExpectOptions<R>): Expect<R>
Uses the given options to override (parts) of the existing configuration. infix fun <T, R> FeatureExpect<T, R>.withOptions(configuration: FeatureExpectOptionsChooser<R>.() -> Unit): Expect<R>
Uses the given configuration-lambda to create an FeatureExpectOptions which in turn is used to override (parts) of the existing configuration. |
|
infix fun <T> RootExpect<T>.withRepresentation(textRepresentation: String): Expect<T> infix fun <T, R> FeatureExpect<T, R>.withRepresentation(textRepresentation: String): Expect<R>
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). infix fun <T> RootExpect<T>.withRepresentation(representationProvider: (T) -> Any): Expect<T> infix fun <T, R> FeatureExpect<T, R>.withRepresentation(representationProvider: (R) -> Any): Expect<R>
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). |
|
infix fun Expect<LocalDate>.year(assertionCreator: Expect<Int>.() -> Unit): Expect<LocalDate>
Expects that the property LocalDate.yearof the subject of the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. infix fun Expect<LocalDateTime>.year(assertionCreator: Expect<Int>.() -> Unit): Expect<LocalDateTime>
Expects that the property LocalDateTime.year of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. infix fun Expect<ZonedDateTime>.year(assertionCreator: Expect<Int>.() -> Unit): Expect<ZonedDateTime>
Expects that the property ZonedDateTime.year of the subject of the assertion holds all assertions the given assertionCreator creates for it and returns an Expect for the current subject of the assertion. |