Skip to content

Instantly share code, notes, and snippets.

@GianpaMX
Created September 5, 2020 19:49
Show Gist options
  • Save GianpaMX/7c22869d8cf93209ead8c86c3f3067d7 to your computer and use it in GitHub Desktop.
Save GianpaMX/7c22869d8cf93209ead8c86c3f3067d7 to your computer and use it in GitHub Desktop.
@Test
fun `Idle State`() = runBlockingTest {
whenever(transitionApi.observeTransitionLog()).thenReturn(flowOf(Transition(State.IDLE, 0)))
val observeStateFlow = observeState()
observeStateFlow.test {
assertThat(expectItem()).isEqualTo(ObserveState.State.Idle)
expectComplete()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment