doc / ch.tutteli.atrium.creating / FeatureExpectOptionsChooser / withRepresentation

withRepresentation

open fun withRepresentation(textRepresentation: String): Unit (source)
Deprecated: Use FeatureExpectOptionsChooser from atrium-logic; will be removed with 0.17.0

Wraps the given textRepresentation into a Text and uses it as representation of the subject instead of the representation that has been defined so far (which defaults to the subject itself).

In case AssertionContainer.maybeSubject is not defined i.e. None, then the previous representation is used.

abstract fun withRepresentation(representationProvider: (R) -> Any): Unit (source)
Deprecated: Use FeatureExpectOptionsChooser from atrium-logic; will be removed with 0.17.0

Uses the given representationProvider to retrieve a representation which can be based on the current subject where this provided representation is used as new representation of the subject instead of the representation that has been defined so far (which defaults to the subject itself).

Notice, if you want to use text (a String which is treated as raw string in reporting) as representation, then wrap it into a Text and pass it instead. If your text does not include the current subject, then we recommend to use the other overload which expects a String and does the wrapping for you.

In case AssertionContainer.maybeSubject is not defined i.e. None, then the previous representation is used.