doc / ch.tutteli.atrium.api.cc.en_GB / value

value

fun <T : CharSequence> CharSequenceContains.CheckerOption<T, NoOpSearchBehaviour>.value(expected: Any): AssertionPlant<T>
Deprecated: Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.

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

Delegates to values(expected).

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
The AssertionPlant for which the assertion was built to support a fluent API.

@JvmName("valueIgnoringCase") fun <T : CharSequence> CharSequenceContains.CheckerOption<T, IgnoringCaseSearchBehaviour>.value(expected: Any): AssertionPlant<T>
Deprecated: Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.

Finishes the specification of the sophisticated contains assertion where the expected value shall be searched (ignoring case), using a non disjoint search.

Delegates to values(expected).

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
The AssertionPlant for which the assertion was built to support a fluent API.

fun <T : CharSequence> CharSequenceContains.Builder<T, IgnoringCaseSearchBehaviour>.value(expected: Any): AssertionPlant<T>
Deprecated: Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.

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

Delegates to atLeast(1).values(expected).

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
The AssertionPlant for which the assertion was built to support a fluent API.

fun <E, T : Iterable<E>> IterableContains.CheckerOption<E, T, InAnyOrderSearchBehaviour>.value(expected: E): AssertionPlant<T>
Deprecated: Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.

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

Delegates to values(expected).

Parameters

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

Exceptions

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

Return
The AssertionPlant for which the assertion was built to support a fluent API.

fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InAnyOrderOnlySearchBehaviour>.value(expected: E): AssertionPlant<T>
Deprecated: Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.


fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InOrderOnlySearchBehaviour>.value(expected: E): AssertionPlant<T>
Deprecated: Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.

Finishes the specification of the sophisticated contains assertion where the Iterable needs to contain only the expected value.

Delegates to values(expected).

Parameters

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

Exceptions

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

Return
The AssertionPlant for which the assertion was built to support a fluent API.

fun <K, V : Any> Assert<Entry<K, V>>.value(assertionCreator: Assert<V>.() -> Unit): AssertionPlant<Entry<K, V>>
Deprecated: Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.

Makes the assertion that the Assert.subject's property value holds all assertions the given assertionCreator might create for it.

Exceptions

AssertionError - Might throw an AssertionError if a created Assertions (by calling assertionCreator) does not hold.

IllegalArgumentException - in case the given assertionCreator did not create a single assertion.

Return
This plant to support a fluent API.

val <V : Any> Assert<Entry<*, V>>.value: Assert<V>
Deprecated: Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.

Creates an AssertionPlant for the Assert.subject's property value so that further fluent calls are assertions about it.

Wrap it into Kotlin's apply if you want to make subsequent assertions on the current subject or use the overload which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block).

Return
The newly created AssertionPlant.