Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- fun `has some weather`() {
- // prepare test data
- val day = "Friday"
- val weatherData = WeatherData(...)
- // mock coroutine call
- coEvery { mockedRepo.getWeather(day) } return weatherData
- dataFlow.getWeatherOfTheDay(day)
- // verify state sequence
- verifySequence {
- view.hasState(WeatherViewState.Init)
- view.hasState(WeatherViewState.Weather(weatherData.day, weatherData.temperature))
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement