mvrx-mocking / com.airbnb.mvrx.mocking / ThreeViewModelMockBuilder / viewModel2StateForLoadingAndFailure

viewModel2StateForLoadingAndFailure

fun <T, A : Async<T>> viewModel2StateForLoadingAndFailure(state: S2 = defaultState2, asyncPropertyBlock: S2.() -> KProperty0<A>): Unit

Helper to mock the loading and failure state of an Async property on your state in the second view model. Creates two different mocked states stemmed from the given state - one where the async property is set to Loading and one where it is set to Fail.