Last active
December 18, 2021 11:16
-
-
Save EmmanuelGuther/439ccb3b17e14f87ff534013536ec6c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| fun myTest() = coroutineDispatcher.runBlockingTest { | |
| val uc = GetPicturesUseCase(MyFakeRepository()) | |
| val item = uc.invoke().first() | |
| assert(item is ResultData.Failure) | |
| } | |
| class MyFakeRepository : FilesRepository { | |
| override fun getPictures(): Flow<ResultData<String>> = flow { | |
| emit(ResultData.Success("a")) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment