-
Notifications
You must be signed in to change notification settings - Fork 157
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
[WIP] Describing assertion failures #19
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Кажется что единственный способ не городить такие костыли: переделать то как составляет ошибку espresso, сами билдеры performException и всякие HumanReadables
import org.hamcrest.StringDescription | ||
|
||
/** | ||
* @return a [String] description of [ViewAssertion]. | ||
*/ | ||
internal fun ViewAssertion?.describe(): String { | ||
if (this == null) return "null" | ||
this ?: return "null" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я не знаю code style, но контрол флоу читается оч плохо когда ретурны не в начале строки, так что я скорее за прошлую конструкцию, еще и с фигурными скобками
kaspresso/src/main/kotlin/com/kaspersky/kaspresso/failure/FailureLoggingProviderImpl.kt
Show resolved
Hide resolved
} else { | ||
viewMatcherDescribers[cachedViewMatcher!!.javaClass] | ||
?.invoke() | ||
?.apply { interaction.perform(this) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
лишних вызовов interaction.perform не происходит?
@eakurnikov any updates on this? |
No description provided.