LithoViewAssert

open class LithoViewAssert : AbstractAssert<SELF, ACTUAL>

Assertion methods for LithoViews.

To create an instance of this class, invoke assertThat.

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

Types

Link copied to clipboard
open class OccurrenceCount

Functions

Link copied to clipboard
open fun as(description: String, args: Array<Any>): SELF
Link copied to clipboard
open fun asList(): AbstractListAssert<out Any, List<out Any>, Any, ObjectAssert<Any>>
Link copied to clipboard
open fun assertThat(actual: LithoView): LithoViewAssert
Link copied to clipboard
open fun asString(): AbstractCharSequenceAssert<out Any, String>
Link copied to clipboard
open fun containsComponents(clazz: Array<Class<out Component>>): LithoViewAssert
open fun containsComponents(clazz: Array<KClass<out Component>>): LithoViewAssert
Assert that the LithoView under test has the provided Component classes in the Component Tree hierarchy
Link copied to clipboard
open fun containsDirectComponents(clazzes: Array<Class<out Component>>): LithoViewAssert
open fun containsDirectComponents(kClazzes: Array<KClass<out Component>>): LithoViewAssert
Assert that the LithoView has a direct component of type clazz
Link copied to clipboard
open fun containsExactly(times: Int, clazz: Class<out Component>): LithoViewAssert
open fun containsExactly(times: Int, clazz: KClass<out Component>): LithoViewAssert
Assert that the LithoView under test has the provided Component class in the Component Tree hierarchy given number of times
Link copied to clipboard
open fun containsExactlyOne(clazz: Class<out Component>): LithoViewAssert
open fun containsExactlyOne(clazz: KClass<out Component>): LithoViewAssert
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 fun describedAs(description: String, args: Array<Any>): SELF
Link copied to clipboard
Link copied to clipboard
open fun doesNotContainComponents(clazz: Array<Class<out Component>>): LithoViewAssert
open fun doesNotContainComponents(clazz: Array<KClass<out Component>>): LithoViewAssert
Assert that the LithoView under test does not contain the provided Component classes in the Component Tree hierarchy
Link copied to clipboard
open fun doesNotContainDirectComponents(clazzes: Array<Class<out Component>>): LithoViewAssert
open fun doesNotContainDirectComponents(kClazzes: Array<KClass<out Component>>): LithoViewAssert
Assert that the LithoView does not have a direct component of type clazz
Link copied to clipboard
Link copied to clipboard
open fun doesNotHave(condition: Condition<out Any>): SELF
Link copied to clipboard
open fun doesNotHaveSameClassAs(other: Any): SELF
Link copied to clipboard
Link copied to clipboard
open fun equals(obj: Any): Boolean
Link copied to clipboard
open fun getWritableAssertionInfo(): WritableAssertionInfo
Link copied to clipboard
open fun has(condition: Condition<out Any>): SELF
Link copied to clipboard
Asserts that the LithoView contains a Component satisfying the given condition at any level of the hierarchy
open fun <T1, T2> hasAnyMatchingComponent(kClass: KClass, propsValuePairs: Array<Pair<KProperty1<T2, T1>, T1>>): LithoViewAssert
Asserts that the LithoView contains a Component with given props at any level of the hierarchy.
Link copied to clipboard
open fun <T2, T1> hasAnyMatchingComponentWithMatcher(kClass: KClass, propsMatcherPairs: Array<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 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.
open fun <T1, T2> hasDirectMatchingComponent(kClass: KClass, propsValuePairs: Array<Pair<KProperty1<T2, T1>, T1>>): LithoViewAssert
Asserts that the LithoView contains a direct Component with given props
Link copied to clipboard
open fun <T2, T1> hasDirectMatchingComponentWithMatcher(kClass: KClass, propsMatcherPairs: Array<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 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
open fun hasSameClassAs(other: Any): SELF
Link copied to clipboard
open fun hasSameHashCodeAs(other: Any): SELF
Link copied to clipboard
open fun hasToString(expectedToString: String): SELF
Link copied to clipboard
open 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
open fun hasVisibleText(@StringRes resourceId: Int): LithoViewAssert
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.
Link copied to clipboard
Assert that the given component contains the provided pattern.
Link copied to clipboard
open fun is(condition: Condition<out Any>): SELF
Link copied to clipboard
open fun isEqualTo(expected: Any): SELF
Link copied to clipboard
open fun isExactlyInstanceOf(type: Class<out Any>): SELF
Link copied to clipboard
open fun isIn(values: Array<Any>): SELF
Link copied to clipboard
open fun isInstanceOf(type: Class<out Any>): SELF
Link copied to clipboard
open fun isInstanceOfAny(types: Array<Class<out Any>>): SELF
Link copied to clipboard
open fun isNot(condition: Condition<out Any>): SELF
Link copied to clipboard
open fun isNotEqualTo(other: Any): SELF
Link copied to clipboard
open fun isNotExactlyInstanceOf(type: Class<out Any>): SELF
Link copied to clipboard
open fun isNotIn(values: Array<Any>): SELF
Link copied to clipboard
open fun isNotInstanceOf(type: Class<out Any>): SELF
Link copied to clipboard
open fun isNotInstanceOfAny(types: Array<Class<out Any>>): SELF
Link copied to clipboard
open fun isNotNull(): SELF
Link copied to clipboard
open fun isNotOfAnyClassIn(types: Array<Class<out Any>>): SELF
Link copied to clipboard
open fun isNotSameAs(other: Any): SELF
Link copied to clipboard
open fun isNull()
Link copied to clipboard
open fun isOfAnyClassIn(types: Array<Class<out Any>>): SELF
Link copied to clipboard
open fun isSameAs(expected: Any): SELF
Link copied to clipboard
Link copied to clipboard
open fun overridingErrorMessage(newErrorMessage: String, args: Array<Any>): SELF
Link copied to clipboard
open fun setCustomRepresentation(customRepresentation: Representation)
Link copied to clipboard
Link copied to clipboard
open fun usingComparator(customComparator: Comparator<out Any>): SELF
Link copied to clipboard
open fun usingDefaultComparator(): SELF
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(newErrorMessage: String, args: Array<Any>): SELF
Link copied to clipboard
open fun withRepresentation(representation: Representation): SELF
Link copied to clipboard
open fun withThreadDumpOnError(): SELF

Properties

Link copied to clipboard
val info: WritableAssertionInfo