atrium-api-fluent-en_GB-jvm / ch.tutteli.atrium.api.fluent.en_GB / value

value

fun <T : CharSequence> <ERROR CLASS><T, <ERROR CLASS>>.value(expected: Any): <ERROR CLASS><T> (source)

Finishes the specification of the sophisticated contains assertion where the expected object shall be searched, using a non disjoint search.

Delegates to values.

Notice that a runtime check applies which assures that only CharSequence, Number and Char are passed (this function expects Any for your convenience, so that you can mix String and Int for instance).

By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times.

Parameters

expected - The value which is expected to be contained within the input of the search.

Exceptions

AssertionError - Might throw an AssertionError if the assertion made is not correct.

IllegalArgumentException - in case expected is not a CharSequence, Number or Char.

Return
An Expect for the current subject of the assertion.

fun <E, T : Iterable<E>> <ERROR CLASS><E, T, <ERROR CLASS>>.value(expected: E): <ERROR CLASS><T> (source)

Finishes the specification of the sophisticated contains assertion where the expected value shall be searched within the Iterable.

Delegates to values.

Parameters

expected - The value which is expected to be contained within this Iterable.

Exceptions

AssertionError - Might throw an AssertionError if the assertion made is not correct.

Return
An Expect for the current subject of the assertion.

fun <K, V, T : Entry<K, V>> <ERROR CLASS><T>.value(assertionCreator: <ERROR CLASS><V>.() -> Unit): <ERROR CLASS><T> (source)

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.

Exceptions

AssertionError - Might throw an AssertionError if the assertion made is not correct.

Return
An Expect for the current subject of the assertion.

val <V, T : Entry<*, V>> <ERROR CLASS><T>.value: <ERROR CLASS><V> (source)

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

Return
The newly created Expect for the extracted feature.