inline val <T> Expect<T>.its: Expect<T>
(source)
Inline property referring actually to this
and allows writing infix assertions within an assertion group block
For instance, instead of:
expect(person) {
this name toBe 1
}
You can write
expect("hello world") {
its name toBe 1
}
Return
this
Since
0.12.0
infix fun <T, R> Expect<T>.its(extractor: T.() -> R): FeatureExpect<T, R>
(source)
Extracts a feature out of the current subject of this
expectation with the help of the given extractor,
creates a new Expect for it and
returns it so that subsequent calls are based on the feature.
Return
The newly created Expect for the extracted feature.
Since
0.16.0
infix fun <T, R> Expect<T>.its(extractorWithCreator: ExtractorWithCreator<T, R>): Expect<T>
(source)
Extracts a feature out of the current subject of this
expectation with the help of the given
extractorWithCreator.extractor,
creates a new Expect for it, applies an assertion group based on the given
extractorWithCreator.assertionCreator for the feature and
returns the initial Expect with the current subject.
Return
an Expect for the subject of this
expectation.
Since
0.16.0