ComponentAssert

class ComponentAssert : AbstractAssert<SELF, ACTUAL>

Deprecated

Assertion methods for Components.

To create an instance of this class, invoke assertThat or assertThat.

Deprecated

Use LithoAssertions which provides entry points to all Litho AssertJ helpers.

Properties

Link copied to clipboard
val info: WritableAssertionInfo

Functions

Link copied to clipboard
Avoid using this method, as an alternative, try invoking the code that causes the real state update in your test.
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(componentContext: ComponentContext, component: Component): ComponentAssert
Link copied to clipboard
open fun asString(): AbstractCharSequenceAssert<out Any, String>
Link copied to clipboard
Verifies that the component contains only the given sub-components and nothing else, in order.
Link copied to clipboard
Assert that the given component contains the provided sub-component.
Link copied to clipboard
open fun describedAs(description: String, args: Array<Any>): SELF
Link copied to clipboard
Link copied to clipboard
Assert that the given component does not contain the provided sub-component.
Link copied to clipboard
open fun doesNotHave(condition: Condition<in ACTUAL>): 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 <A> extracting(extractor: Extractor<Component, List<A>>): ListAssert<A>
Extract values from the underlying component based on the Extractor provided.
Link copied to clipboard
Link copied to clipboard
Extract the sub components from the underlying Component, returning a ListAssert over it
Link copied to clipboard
Extract the sub components recursively from the underlying Component, returning a ListAssert over it.
Link copied to clipboard
open fun getWritableAssertionInfo(): WritableAssertionInfo
Link copied to clipboard
open fun has(condition: Condition<in ACTUAL>): SELF
Link copied to clipboard
open fun hasContentDescription(contentDescription: String): ComponentAssert
Assert that any view in the given Component has the provided content description.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
Assert that the given component has no sub-components.
Link copied to clipboard
open fun <T1, T2> hasProps(property: KProperty1<T2, T1>, value: T1): ComponentAssert
Assert that a given Component has a property equaling the provided value.
Link copied to clipboard
open fun <T1, T2> hasPropsMatching(property: KProperty1<T2, T1>, matcher: Matcher<T1>): ComponentAssert
Assert that a given Component has a property matching the provided matcher.
Link copied to clipboard
open fun hasSameClassAs(other: Any): SELF
Link copied to clipboard
open fun hasSameHashCodeAs(other: Any): SELF
Link copied to clipboard
Verifies that the component contains the exact list of provided sub-components.
Link copied to clipboard
open fun hasToString(expectedToString: String): SELF
Link copied to clipboard
open fun hasViewTag(tagId: Int, tagValue: Any): ComponentAssert
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): ComponentAssert
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<in ACTUAL>): 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<in ACTUAL>): 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
open fun overridingErrorMessage(newErrorMessage: String, args: Array<Any>): SELF
Link copied to clipboard
open fun setCustomRepresentation(customRepresentation: Representation)
Link copied to clipboard
open fun usingComparator(customComparator: Comparator<in ACTUAL>): SELF
Link copied to clipboard
open fun usingDefaultComparator(): SELF
Link copied to clipboard
Link copied to clipboard
Assert that a given Component produces a non-null layout.
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
Avoid using this method.
Link copied to clipboard
open fun withThreadDumpOnError(): SELF
Link copied to clipboard
Assert that a given Component renders to null, i.e.