public final class StateUpdatesTestHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
StateUpdatesTestHelper.StateUpdater |
Modifier and Type | Method and Description |
---|---|
static LithoView |
getViewAfterStateUpdate(ComponentContext context,
Component component)
Returns a LithoView after all outstanding asynchronous state updates are performed.
|
static LithoView |
getViewAfterStateUpdate(ComponentContext context,
Component component,
StateUpdatesTestHelper.StateUpdater stateUpdater)
Call a state update as specified in
StateUpdatesTestHelper.StateUpdater.performStateUpdate(ComponentContext)
on the component and return the updated view. |
static LithoView |
getViewAfterStateUpdate(ComponentContext context,
Component component,
StateUpdatesTestHelper.StateUpdater stateUpdater,
boolean incrementalMountEnabled,
boolean visibilityProcessingEnabled)
Call a state update as specified in
StateUpdatesTestHelper.StateUpdater.performStateUpdate(ComponentContext)
on the component and return the updated view with the option to incrementally mount. |
static LithoView |
getViewAfterStateUpdate(ComponentContext context,
Component component,
StateUpdatesTestHelper.StateUpdater stateUpdater,
ShadowLooper layoutThreadShadowLooper)
Call a state update as specified in
StateUpdatesTestHelper.StateUpdater.performStateUpdate(ComponentContext)
on the component and return the updated view. |
static LithoView |
getViewAfterStateUpdate(ComponentContext context,
Component component,
StateUpdatesTestHelper.StateUpdater stateUpdater,
ShadowLooper[] loopers,
boolean incrementalMountEnabled,
boolean visibilityProcessingEnabled)
Call a state update as specified in
StateUpdatesTestHelper.StateUpdater.performStateUpdate(ComponentContext)
on the component and return the updated view with the option to incrementally mount. |
static LithoView |
getViewAfterStateUpdate(ComponentContext context,
Component component,
StateUpdatesTestHelper.StateUpdater stateUpdater,
ShadowLooper layoutThreadShadowLooper,
boolean incrementalMountEnabled,
boolean visibilityProcessingEnabled)
Call a state update as specified in
StateUpdatesTestHelper.StateUpdater.performStateUpdate(ComponentContext)
on the component and return the updated view with the option to incrementally mount. |
public static LithoView getViewAfterStateUpdate(ComponentContext context, Component component, StateUpdatesTestHelper.StateUpdater stateUpdater, ShadowLooper layoutThreadShadowLooper)
StateUpdatesTestHelper.StateUpdater.performStateUpdate(ComponentContext)
on the component and return the updated view.context
- contextcomponent
- the component to updatestateUpdater
- implementation of StateUpdatesTestHelper.StateUpdater
that triggers the state updatelayoutThreadShadowLooper
- shadow looper to post messages to the main threadpublic static LithoView getViewAfterStateUpdate(ComponentContext context, Component component)
context
- contextcomponent
- the component to updatepublic static LithoView getViewAfterStateUpdate(ComponentContext context, Component component, StateUpdatesTestHelper.StateUpdater stateUpdater)
StateUpdatesTestHelper.StateUpdater.performStateUpdate(ComponentContext)
on the component and return the updated view.context
- contextcomponent
- the component to updatestateUpdater
- implementation of StateUpdatesTestHelper.StateUpdater
that triggers the state updatepublic static LithoView getViewAfterStateUpdate(ComponentContext context, Component component, StateUpdatesTestHelper.StateUpdater stateUpdater, boolean incrementalMountEnabled, boolean visibilityProcessingEnabled)
StateUpdatesTestHelper.StateUpdater.performStateUpdate(ComponentContext)
on the component and return the updated view with the option to incrementally mount.context
- contextcomponent
- the component to updatestateUpdater
- implementation of StateUpdatesTestHelper.StateUpdater
that triggers the state updateincrementalMountEnabled
- whether or not to enable incremental mount for the componentpublic static LithoView getViewAfterStateUpdate(ComponentContext context, Component component, StateUpdatesTestHelper.StateUpdater stateUpdater, ShadowLooper layoutThreadShadowLooper, boolean incrementalMountEnabled, boolean visibilityProcessingEnabled)
StateUpdatesTestHelper.StateUpdater.performStateUpdate(ComponentContext)
on the component and return the updated view with the option to incrementally mount.context
- contextcomponent
- the component to updatestateUpdater
- implementation of StateUpdatesTestHelper.StateUpdater
that triggers the state updatelayoutThreadShadowLooper
- shadow looper to post messages to the main threadincrementalMountEnabled
- whether or not to enable incremental mount for the componentpublic static LithoView getViewAfterStateUpdate(ComponentContext context, Component component, StateUpdatesTestHelper.StateUpdater stateUpdater, ShadowLooper[] loopers, boolean incrementalMountEnabled, boolean visibilityProcessingEnabled)
StateUpdatesTestHelper.StateUpdater.performStateUpdate(ComponentContext)
on the component and return the updated view with the option to incrementally mount.context
- contextcomponent
- the component to updatestateUpdater
- implementation of StateUpdatesTestHelper.StateUpdater
that triggers the state updateloopers
- shadow loopers to post messages to the main thread, run in the same order they
are specifiedincrementalMountEnabled
- whether or not to enable incremental mount for the component