Contains API which provides an infix API in English and which has its design focus on usability in conjunction with code completion.
class All<out T> : VarArgHelper<T>
Parameter object to express |
|
object Blank : Keyword
Represents a helper construct which allows to express blankness. It can be used for a parameter less function so that it has one parameter and thus can be used as infix function. |
|
object case : Keyword
Represents the pseudo keyword |
|
object contain : Keyword
Represents the pseudo keyword |
|
object Empty : Keyword
Represents a helper construct which allows to express emptiness. It can be used for a parameter less function so that it has one parameter and thus can be used as infix function. |
|
object entries : Keyword
Represents the pseudo keyword |
|
object group : Keyword
Represents the pseudo keyword |
|
data class KeyValue<out K, V : Any>
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 |
|
interface Keyword
Marker interface for keywords. |
|
object not : Keyword
Represents the pseudo keyword |
|
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 |
|
class Pairs<out K, out V> : VarArgHelper<Pair<K, V>>
Parameter object to express |
|
class RegexPatterns : VarArgHelper<String>
Parameter object to express |
|
class Values<out T> : GroupWithoutNullableEntries<T>, GroupWithNullableEntries<T>, VarArgHelper<T>
Represents a Group of multiple values. |
annotation class ExperimentalWithOptions |
typealias O = o
Workaround for https://youtrack.jetbrains.com/issue/KT-36624, extension property takes precedence over object. |
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 <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 <T> Expect<T>.o: Expect<T>
Inline property referring actually to |
|
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. |
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 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. |
|
fun <K, V, T : Map<out K, V>> Expect<T>.asEntries(): 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 |
|
fun <E, T : Sequence<E>> Expect<T>.asIterable(): 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 <T : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.Builder<T, S>.atLeast(times: Int): AtLeastCheckerOption<T, S>
Restricts a |
|
infix fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.Builder<T, S>.atMost(times: Int): AtMostCheckerOption<T, S>
Restricts a |
|
infix fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> AtLeastCheckerOption<T, S>.butAtMost(times: Int): ButAtMostCheckerOption<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.Builder<T, NoOpSearchBehaviour>
Creates a CharSequenceContains.Builder based on this Expect which allows to define
a sophisticated infix fun <T : CharSequence> Expect<T>.contains(not: not): NotCheckerOption<T, NotSearchBehaviour>
Creates a CharSequenceContains.Builder based on this Expect which allows to define
more sophisticated infix fun <T : CharSequence> Expect<T>.contains(expected: Any): 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<Any>): 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(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 <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: KeyValue<K, V>): Expect<T>
Expects that the subject of the assertion (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 infix fun <K, V : Any, T : Map<out K, V?>> Expect<T>.contains(keyValues: All<KeyValue<K, V>>): Expect<T>
Expects that the subject of the assertion (a Map) contains for each KeyValue in keyValues,
a key as defined by KeyValue.key with a corresponding value which either holds all
assertions KeyValue's KeyValue.valueAssertionCreatorOrNull creates or needs to be |
|
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(expected: Any): 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<Any>): Expect<T>
Expects that the subject of the assertion (a CharSequence) does not contain the toString representation of the given 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 <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 <T : CharSequence> Expect<T>.containsRegex(patterns: RegexPatterns): 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 <T : CharSequence> CharSequenceContains.CheckerOption<T, NoOpSearchBehaviour>.elementsOf(expectedIterable: Iterable<Any>): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, IgnoringCaseSearchBehaviour>.elementsOf(expectedIterable: Iterable<Any>): 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 : 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 : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.Builder<T, S>.exactly(times: Int): ExactlyCheckerOption<T, S>
Restricts a |
|
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 <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 <T : CharSequence> CharSequenceContains.Builder<T, NoOpSearchBehaviour>.ignoring(case: case): CharSequenceContains.Builder<T, IgnoringCaseSearchBehaviour>
Defines that the search behaviour infix fun <T : CharSequence> NotCheckerOption<T, NotSearchBehaviour>.ignoring(case: case): NotCheckerOption<T, IgnoringCaseSearchBehaviour>
Defines that the search behaviour |
|
fun <E> index(index: Int, assertionCreator: Expect<E>.() -> Unit): IndexWithCreator<E>
Helper function to create an IndexWithCreator based on the given index and assertionCreator. |
|
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 : 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>.isNotSameAs(expected: T): Expect<T>
Expects that the subject of the assertion is not the same instance as 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. |
|
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.CheckerOption<T, NoOpSearchBehaviour>.matchFor(pattern: Regex): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, NoOpSearchBehaviour>.matchFor(patterns: All<Regex>): Expect<T>
Finishes the specification of the sophisticated |
|
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: Any): 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 <T : CharSequence> Expect<T>.mismatches(expected: Regex): Expect<T>
Expects that the subject of the assertion (a CharSequence) mismatches the given expected. |
|
infix fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.Builder<T, S>.notOrAtMost(times: Int): NotOrAtMostCheckerOption<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 : 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, 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. |
|
infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, NoOpSearchBehaviour>.regex(pattern: String): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, IgnoringCaseSearchBehaviour>.regex(pattern: String): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.Builder<T, IgnoringCaseSearchBehaviour>.regex(pattern: String): Expect<T>
Finishes the specification of the sophisticated |
|
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 : 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 : CharSequence> CharSequenceContains.CheckerOption<T, NoOpSearchBehaviour>.the(values: Values<Any>): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, IgnoringCaseSearchBehaviour>.the(values: Values<Any>): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.Builder<T, IgnoringCaseSearchBehaviour>.the(values: Values<Any>): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, NoOpSearchBehaviour>.the(patterns: RegexPatterns): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, IgnoringCaseSearchBehaviour>.the(patterns: RegexPatterns): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.Builder<T, IgnoringCaseSearchBehaviour>.the(patterns: RegexPatterns): 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 : 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.CheckerOption<T, NoOpSearchBehaviour>.value(expected: Any): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.CheckerOption<T, IgnoringCaseSearchBehaviour>.value(expected: Any): Expect<T>
Finishes the specification of the sophisticated infix fun <T : CharSequence> CharSequenceContains.Builder<T, IgnoringCaseSearchBehaviour>.value(expected: Any): 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. |
|
infix fun <K, V, T : Map<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. |
|
infix fun <T> RootExpect<T>.withOptions(configuration: ExpectBuilder.OptionsChooser<T>.() -> Unit): Expect<T> infix fun <T, R> FeatureExpect<T, R>.withOptions(configuration: FeatureExtractorBuilder.OptionsChooser<R>.() -> Unit): Expect<R>
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: FeatureOptions<R>): Expect<R>
Uses the given options 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 RawString 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). |