class OptionsChooserImpl<T> : ExpectBuilder.OptionsChooser<T> (source)
OptionsChooserImpl() |
fun build(): ExpectOptions<T> |
|
fun withReporter(reporter: <ERROR CLASS>): Unit
Uses the given reporter instead of the default reporter. |
|
fun withRepresentation(representationProvider: (T) -> Any): Unit
Uses the given representationProvider to retrieve a representation which can be based on the current subject where it is used as new representation of the subject instead of the representation that has been defined so far (which defaults to the subject itself). |
|
fun withVerb(verb: <ERROR CLASS>): Unit
Uses the given verb as assertion verb instead of the previously defined verb. |
open fun withRepresentation(textRepresentation: String): Unit
Wraps the given textRepresentation into a RawString and uses it as representation of the subject instead of the representation that has been defined so far (which defaults to the subject itself). |
|
open fun withVerb(verb: String): Unit
Wraps the given verb into an Untranslatable and passes it to the overload which expects a Translatable -- this is then used as custom assertion verb instead of the previously defined verb. |
fun <T, A> A.asExpect(): <ERROR CLASS><T>fun <T : Any, A> A.asExpect(assertionCreator: <ERROR CLASS><T>.() -> Unit): A
Turns Assert or AssertionPlantNullable into an Expect so that you can use new functionality which is not available on Assert/AssertionPlantNullable. |