Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added samples for IterableExpectations #1012

Merged
merged 15 commits into from
Oct 16, 2021
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
eccdfb7
Added samples for IterableExpectations
vinayak03 Oct 14, 2021
4ca2bce
Update apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin…
robstoll Oct 16, 2021
1e26726
Update apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin…
robstoll Oct 16, 2021
5a62186
Update apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin…
robstoll Oct 16, 2021
81c211d
Update apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin…
robstoll Oct 16, 2021
d5ec8cf
Update apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin…
robstoll Oct 16, 2021
478a491
Update apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin…
robstoll Oct 16, 2021
3cf0de8
Update apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin…
robstoll Oct 16, 2021
0a5a732
Update apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin…
robstoll Oct 16, 2021
8d84711
Update apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin…
robstoll Oct 16, 2021
033c445
Update apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin…
robstoll Oct 16, 2021
dfb207c
Update apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin…
robstoll Oct 16, 2021
569aa70
Update apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin…
robstoll Oct 16, 2021
a0e95f6
Update apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin…
robstoll Oct 16, 2021
a7be460
Update apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin…
robstoll Oct 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import ch.tutteli.kbox.identity
*
* @return The newly created builder.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.toContainBuilder
*
* @since 0.17.0
*/
infix fun <E, T : Iterable<E>> Expect<T>.toContain(
Expand All @@ -32,6 +34,8 @@ infix fun <E, T : Iterable<E>> Expect<T>.toContain(
*
* @return The newly created builder.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.notToContainBuilder
*
* @since 0.17.0
*/
infix fun <E, T : Iterable<E>> Expect<T>.notToContain(
Expand All @@ -45,6 +49,8 @@ infix fun <E, T : Iterable<E>> Expect<T>.notToContain(
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.toContainValue
*
* @since 0.17.0
*/
infix fun <E, T : Iterable<E>> Expect<T>.toContain(expected: E): Expect<T> =
Expand All @@ -70,6 +76,8 @@ infix fun <E, T : Iterable<E>> Expect<T>.toContain(expected: E): Expect<T> =
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.toContainValues
*
* @since 0.17.0
*/
infix fun <E, T : Iterable<E>> Expect<T>.toContain(values: Values<E>): Expect<T> =
Expand All @@ -88,6 +96,8 @@ infix fun <E, T : Iterable<E>> Expect<T>.toContain(values: Values<E>): Expect<T>
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.toContainAssertion
*
* @since 0.17.0
*/
infix fun <E : Any, T : Iterable<E?>> Expect<T>.toContain(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T> =
Expand All @@ -107,6 +117,8 @@ infix fun <E : Any, T : Iterable<E?>> Expect<T>.toContain(assertionCreatorOrNull
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.toContainAssertions
*
* @since 0.17.0
*/
infix fun <E : Any, T : Iterable<E?>> Expect<T>.toContain(entries: Entries<E>): Expect<T> =
Expand All @@ -120,6 +132,8 @@ infix fun <E : Any, T : Iterable<E?>> Expect<T>.toContain(entries: Entries<E>):
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.toContainExactlyValue
*
* @since 0.17.0
*/
infix fun <E, T : Iterable<E>> Expect<T>.toContainExactly(expected: E): Expect<T> =
Expand All @@ -140,6 +154,8 @@ infix fun <E, T : Iterable<E>> Expect<T>.toContainExactly(expected: E): Expect<T
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.toContainExactlyValues
*
* @since 0.17.0
*/
infix fun <E, T : Iterable<E>> Expect<T>.toContainExactly(values: Values<E>): Expect<T> =
Expand All @@ -162,6 +178,8 @@ infix fun <E, T : Iterable<E>> Expect<T>.toContainExactly(values: Values<E>): Ex
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.toContainExactlyAssertion
*
* @since 0.17.0
*/
infix fun <E : Any, T : Iterable<E?>> Expect<T>.toContainExactly(
Expand All @@ -187,6 +205,8 @@ infix fun <E : Any, T : Iterable<E?>> Expect<T>.toContainExactly(
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.toContainExactlyAssertions
*
* @since 0.17.0
*/
infix fun <E : Any, T : Iterable<E?>> Expect<T>.toContainExactly(entries: Entries<E>): Expect<T> =
Expand All @@ -205,6 +225,8 @@ infix fun <E : Any, T : Iterable<E?>> Expect<T>.toContainExactly(entries: Entrie
* @throws IllegalArgumentException in case [expectedIterableLike] is not an [Iterable], [Sequence] or one of the [Array] types
* or the given [expectedIterableLike] does not have elements (is empty).
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.toContainExactlyElementsOf
*
* @since 0.17.0
*/
inline infix fun <reified E, T : Iterable<E>> Expect<T>.toContainExactlyElementsOf(
Expand All @@ -224,6 +246,8 @@ inline infix fun <reified E, T : Iterable<E>> Expect<T>.toContainExactlyElements
* @throws IllegalArgumentException in case [expectedIterableLike] is not an [Iterable], [Sequence] or one of the [Array] types
* or the given [expectedIterableLike] does not have elements (is empty).
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.toContainElementsOf
*
* @since 0.17.0
*/
inline infix fun <reified E, T : Iterable<E>> Expect<T>.toContainElementsOf(
Expand All @@ -238,6 +262,8 @@ inline infix fun <reified E, T : Iterable<E>> Expect<T>.toContainElementsOf(
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.notToContainValue
*
* @since 0.17.0
*/
infix fun <E, T : Iterable<E>> Expect<T>.notToContain(expected: E): Expect<T> =
Expand All @@ -254,6 +280,8 @@ infix fun <E, T : Iterable<E>> Expect<T>.notToContain(expected: E): Expect<T> =
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.notToContain
robstoll marked this conversation as resolved.
Show resolved Hide resolved
*
* @since 0.17.0
*/
infix fun <E, T : Iterable<E>> Expect<T>.notToContain(values: Values<E>): Expect<T> =
Expand All @@ -264,6 +292,8 @@ infix fun <E, T : Iterable<E>> Expect<T>.notToContain(values: Values<E>): Expect
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.toHaveElements
*
* @since 0.17.0
*/
infix fun <E, T : Iterable<E>> Expect<T>.toHave(@Suppress("UNUSED_PARAMETER") elements: elements): Expect<T> =
Expand All @@ -274,6 +304,8 @@ infix fun <E, T : Iterable<E>> Expect<T>.toHave(@Suppress("UNUSED_PARAMETER") el
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.notToHaveElements
*
* @since 0.17.0
*/
infix fun <E, T : Iterable<E>> Expect<T>.notToHave(@Suppress("UNUSED_PARAMETER") elements: elements): Expect<T> =
Expand All @@ -289,6 +321,8 @@ infix fun <E, T : Iterable<E>> Expect<T>.notToHave(@Suppress("UNUSED_PARAMETER")
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.toHaveElementsAndAny
*
* @since 0.17.0
*/
infix fun <E : Any, T : Iterable<E?>> Expect<T>.toHaveElementsAndAny(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T> =
Expand All @@ -304,6 +338,8 @@ infix fun <E : Any, T : Iterable<E?>> Expect<T>.toHaveElementsAndAny(assertionCr
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.toHaveElementsAndNone
*
* @since 0.17.0
*/
infix fun <E : Any, T : Iterable<E?>> Expect<T>.toHaveElementsAndNone(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T> =
Expand All @@ -316,6 +352,8 @@ infix fun <E : Any, T : Iterable<E?>> Expect<T>.toHaveElementsAndNone(assertionC
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.toHaveElementsAndAll
*
* @since 0.17.0
*/
infix fun <E : Any, T : Iterable<E?>> Expect<T>.toHaveElementsAndAll(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T> =
Expand All @@ -327,6 +365,8 @@ infix fun <E : Any, T : Iterable<E?>> Expect<T>.toHaveElementsAndAll(assertionCr
*
* @return an [Expect] for the subject of `this` expectation.
*
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.IterableExpectationSamples.toHaveElementsAndNoDuplicates
*
* @since 0.17.0
*/
infix fun <E, T : Iterable<E>> Expect<T>.toHaveElementsAnd(@Suppress("UNUSED_PARAMETER") noDuplicates: noDuplicates): Expect<T> =
Expand Down
Loading