//Extensions for Dagger Hilt/it.czerwinski.android.hilt.fragment.testing/HiltFragmentScenario/moveToState

moveToState

[androidJvm]
Content
fun moveToState(newState: Lifecycle.State): HiltFragmentScenario<F, A>
More info

Moves Fragment state to a new state.

If a new state and current state are the same, this method does nothing.

It accepts CREATED, STARTED, RESUMED, and DESTROYED.

DESTROYED is a terminal state. You cannot move to any other state after the Fragment reaches that state.

This method cannot be called from the main thread.

Note: Moving state to STARTED is not supported on Android API level 23 and lower. UnsupportedOperationException will be thrown.