@@ -12,6 +12,8 @@ import ch.tutteli.atrium.logic.changeSubject
12
12
* Use `feature(Sequence::asIterable)` if you want to show the transformation in reporting.
13
13
*
14
14
* @return The newly created [Expect] for the transformed subject.
15
+ *
16
+ * @sample ch.tutteli.atrium.api.fluent.en_GB.samples.SequenceExpectationSamples.asIterableFeature
15
17
*/
16
18
fun <E , T : Sequence <E >> Expect<T>.asIterable (): Expect <Iterable <E >> =
17
19
_logic .changeSubject.unreported { it.asIterable() }
@@ -24,6 +26,8 @@ fun <E, T : Sequence<E>> Expect<T>.asIterable(): Expect<Iterable<E>> =
24
26
* Use `feature(Sequence::asIterable, assertionCreator)` if you want to show the transformation in reporting.
25
27
*
26
28
* @return an [Expect] for the subject of `this` expectation.
29
+ *
30
+ * @sample ch.tutteli.atrium.api.fluent.en_GB.samples.SequenceExpectationSamples.asIterable
27
31
*/
28
32
fun <E , T : Sequence <E >> Expect<T>.asIterable (assertionCreator : Expect <Iterable <E >>.() -> Unit ): Expect <T > =
29
33
apply { asIterable()._logic .appendAsGroup(assertionCreator) }
@@ -37,6 +41,8 @@ fun <E, T : Sequence<E>> Expect<T>.asIterable(assertionCreator: Expect<Iterable<
37
41
* @return The newly created [Expect] for the transformed subject.
38
42
*
39
43
* @since 0.14.0
44
+ *
45
+ * @sample ch.tutteli.atrium.api.fluent.en_GB.samples.SequenceExpectationSamples.asListFeature
40
46
*/
41
47
fun <E , T : Sequence <E >> Expect<T>.asList (): Expect <List <E >> = _logic .changeSubject.unreported { it.toList() }
42
48
@@ -50,6 +56,8 @@ fun <E, T : Sequence<E>> Expect<T>.asList(): Expect<List<E>> = _logic.changeSubj
50
56
* @return an [Expect] for the subject of `this` expectation.
51
57
*
52
58
* @since 0.14.0
59
+ *
60
+ * @sample ch.tutteli.atrium.api.fluent.en_GB.samples.SequenceExpectationSamples.asList
53
61
*/
54
62
fun <E , T : Sequence <E >> Expect<T>.asList (assertionCreator : Expect <List <E >>.() -> Unit ): Expect <T > =
55
63
apply { asList()._logic .appendAsGroup(assertionCreator) }
0 commit comments