public final class StateUpdatesTestHelper extends 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,
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)
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)
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) throws Exception
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 threadException
public static LithoView getViewAfterStateUpdate(ComponentContext context, Component component) throws Exception
context
- contextcomponent
- the component to updateException
public static LithoView getViewAfterStateUpdate(ComponentContext context, Component component, StateUpdatesTestHelper.StateUpdater stateUpdater) throws Exception
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 updateException
public static LithoView getViewAfterStateUpdate(ComponentContext context, Component component, StateUpdatesTestHelper.StateUpdater stateUpdater, ShadowLooper layoutThreadShadowLooper, boolean incrementalMountEnabled) throws Exception
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 componentException
public static LithoView getViewAfterStateUpdate(ComponentContext context, Component component, StateUpdatesTestHelper.StateUpdater stateUpdater, ShadowLooper[] loopers, boolean incrementalMountEnabled) throws Exception
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 componentException