LithoViewAssert

class LithoViewAssert : AbstractAssert<LithoViewAssert, LithoView>

Assertion methods for LithoViews.

To create an instance of this class, invoke [LithoViewAssert.assertThat].

Alternatively, use LegacyLithoAssertions which provides entry points to all Litho AssertJ helpers.

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Properties

Link copied to clipboard
val info: WritableAssertionInfo

Functions

Link copied to clipboard
open override fun as(p0: Description): LithoViewAssert
open override fun as(p0: String, vararg p1: Any): LithoViewAssert
Link copied to clipboard
open override fun asList(): AbstractListAssert<*, MutableList<out Any>, Any, ObjectAssert<Any>>
Link copied to clipboard
open override fun asString(): AbstractCharSequenceAssert<*, String>
Link copied to clipboard

Assert that the LithoView under test has the provided Component classes in the Component Tree hierarchy

Link copied to clipboard

Assert that the LithoView has a direct component of type clazz

Link copied to clipboard

Assert that the LithoView under test has the provided Component class in the Component Tree hierarchy given number of times

Link copied to clipboard

Assert that the LithoView under test has the provided Component class once in the Component Tree hierarchy.

Link copied to clipboard
Link copied to clipboard
open override fun describedAs(p0: Description): LithoViewAssert
open override fun describedAs(p0: String, vararg p1: Any): LithoViewAssert
Link copied to clipboard
Link copied to clipboard

Assert that the LithoView under test does not contain the provided Component classes in the Component Tree hierarchy

Link copied to clipboard

Assert that the LithoView does not have a direct component of type clazz

Link copied to clipboard
Link copied to clipboard
open override fun doesNotHave(p0: Condition<in LithoView>): LithoViewAssert
Link copied to clipboard
fun <T1, T2> doesNotHaveMatchingComponent(kClass: KClass<out Component>, vararg propsValuePairs: Pair<KProperty1<T2, T1>, T1>): LithoViewAssert

Asserts that the LithoView does not contain a Component with given props at any level of the hierarchy. This function uses DFS algorithm to go through the whole component tree

Link copied to clipboard
Link copied to clipboard

Inverse of .hasVisibleDrawable

Link copied to clipboard

Inverse of .hasVisibleText

Link copied to clipboard

Inverse of .hasVisibleTextContaining.

Link copied to clipboard

Inverse of .hasVisibleTextMatching.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open fun getWritableAssertionInfo(): WritableAssertionInfo
Link copied to clipboard
open override fun has(p0: Condition<in LithoView>): LithoViewAssert
Link copied to clipboard

Asserts that the LithoView contains a Component satisfying the given condition at any level of the hierarchy

fun <T1, T2> hasAnyMatchingComponent(kClass: KClass<out Component>, vararg propsValuePairs: Pair<KProperty1<T2, T1>, T1>): LithoViewAssert

Asserts that the LithoView contains a Component with given props at any level of the hierarchy. This function uses DFS algorithm to go through the whole component tree

Link copied to clipboard
fun <T2, T1> hasAnyMatchingComponentWithMatcher(kClass: KClass<out Component>, vararg propsMatcherPairs: Pair<KProperty1<T2, T1>, Matcher<T1>>): LithoViewAssert

Asserts that the LithoView contains a Component with props that matches given matcher at any level of the hierarchy

Link copied to clipboard
fun hasContentDescription(contentDescription: String): LithoViewAssert

Assert that any view in the given Component has the provided content description.

Link copied to clipboard

Asserts that the LithoView will render Component as a direct children of the root satisfying the given condition.

fun <T1, T2> hasDirectMatchingComponent(kClass: KClass<out Component>, vararg propsValuePairs: Pair<KProperty1<T2, T1>, T1>): LithoViewAssert

Asserts that the LithoView contains a direct Component with given props

Link copied to clipboard
fun <T2, T1> hasDirectMatchingComponentWithMatcher(kClass: KClass<out Component>, vararg propsMatcherPairs: Pair<KProperty1<T2, T1>, Matcher<T1>>): LithoViewAssert

Asserts that the LithoView contains a Component with props that matches given matcher at any level of the hierarchy

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Assert that the LithoView under test has the provided measured height.

Link copied to clipboard

Assert that the LithoView under test has the provided measured width.

Link copied to clipboard

Assert that any view in the given Component do not have the provided content description.

Link copied to clipboard
open override fun hasSameClassAs(p0: Any): LithoViewAssert
Link copied to clipboard
open override fun hasSameHashCodeAs(p0: Any): LithoViewAssert
Link copied to clipboard
open override fun hasToString(p0: String): LithoViewAssert
Link copied to clipboard
fun hasViewTag(tagId: Int, tagValue: Any): LithoViewAssert

Assert that the view tag is present for the given index.

Link copied to clipboard

Assert that the given component contains the drawable provided.

Assert that the given component contains the drawable identified by the provided drawable resource id.

Link copied to clipboard

Assert that the given component has the exact text identified by resource id.

Assert that the given component has the exact text provided.

Link copied to clipboard

Assert that the given component contains the provided text. Useful if checking portion of text that may be appended with other text in a span.

Link copied to clipboard

Assert that the given component contains the provided pattern.

Link copied to clipboard
open override fun is(p0: Condition<in LithoView>): LithoViewAssert
Link copied to clipboard
open override fun isEqualTo(p0: Any): LithoViewAssert
Link copied to clipboard
open override fun isExactlyInstanceOf(p0: Class<*>): LithoViewAssert
Link copied to clipboard
open override fun isIn(vararg p0: Any): LithoViewAssert
open override fun isIn(p0: MutableIterable<*>): LithoViewAssert
Link copied to clipboard
open override fun isInstanceOf(p0: Class<*>): LithoViewAssert
Link copied to clipboard
open override fun isInstanceOfAny(vararg p0: Class<*>): LithoViewAssert
Link copied to clipboard
open override fun isNot(p0: Condition<in LithoView>): LithoViewAssert
Link copied to clipboard
open override fun isNotEqualTo(p0: Any): LithoViewAssert
Link copied to clipboard
open override fun isNotExactlyInstanceOf(p0: Class<*>): LithoViewAssert
Link copied to clipboard
open override fun isNotIn(vararg p0: Any): LithoViewAssert
open override fun isNotIn(p0: MutableIterable<*>): LithoViewAssert
Link copied to clipboard
open override fun isNotInstanceOf(p0: Class<*>): LithoViewAssert
Link copied to clipboard
open override fun isNotInstanceOfAny(vararg p0: Class<*>): LithoViewAssert
Link copied to clipboard
open override fun isNotNull(): LithoViewAssert
Link copied to clipboard
open override fun isNotOfAnyClassIn(vararg p0: Class<*>): LithoViewAssert
Link copied to clipboard
open override fun isNotSameAs(p0: Any): LithoViewAssert
Link copied to clipboard
open override fun isNull()
Link copied to clipboard
open override fun isOfAnyClassIn(vararg p0: Class<*>): LithoViewAssert
Link copied to clipboard
open override fun isSameAs(p0: Any): LithoViewAssert
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Assert that the LithoView will not render content, the root component will either return null or a child with width and height equal to 0

Link copied to clipboard

Assert that the LithoView will render content, the root component won't return null nor a child with height and width equal to 0

Link copied to clipboard
open fun withFailMessage(p0: String, vararg p1: Any): LithoViewAssert
Link copied to clipboard
open override fun withRepresentation(p0: Representation): LithoViewAssert
Link copied to clipboard