Created
April 7, 2018 17:00
-
-
Save AOrobator/0ffcc2ded1a562242fdf2cb1e41ccfe9 to your computer and use it in GitHub Desktop.
Tests don't cover all bugs
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 `When unscanned song clicked, song is scanned into library`() { | |
val presenter = FolderBrowsingPresenter(queue, MockSongRepository()) | |
val target: FolderBrowsingPresenter.Target = mock() | |
presenter.attach(target) | |
presenter.onUnscannedSongClicked( | |
DirectoryItemSong( | |
name = "01 Get You.m4a", | |
lastModifiedTime = 1234L, | |
inDatabase = false, | |
path = "/sdcard/Music/Daniel Caesar/Freudian/01 Get You.m4a", | |
size = 9001 | |
) | |
) | |
verify(target).showLoading() | |
verify(target).hideLoading() | |
verify(target).playSong(420L.toSongId()) | |
verifyNoMoreInteractions(target) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment