Created
May 30, 2019 11:46
-
-
Save marinat/5aa98f742abdcb8e9a921267f56a44ac to your computer and use it in GitHub Desktop.
This file contains 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 intervalOrderNotEnough() { | |
runBlocking { | |
intervalRepository.insertAll(arrayListOf( | |
Interval(1, 0, 0, 86399) | |
)) | |
playListRepository.insertAll(arrayListOf( | |
PlayList(1, "pl1", ""), | |
PlayList(2, "pl2", "") | |
)) | |
intervalOrderRepository.insertAll(arrayListOf( | |
IntervalOrder(1, 1, 1, null, 0), | |
IntervalOrder(2, 1, 2, null, 0) | |
)) | |
for (i in 0..20) { | |
trackRepository.insert(Track((i * 2).toLong(), "track$i", "", 100, 0, false, "", false)) | |
playListTrackRepository.insert(PlayListTrack(1, (i * 2).toLong(), i, false)) | |
trackRepository.insert(Track((i * 2 + 1).toLong(), "track$i", "", 100, 0, false, "", false)) | |
playListTrackRepository.insert(PlayListTrack(2, (i * 2 + 1).toLong(), i, false)) | |
} | |
intervalPriorityRepository.insert(IntervalPriority(1, 1, 1)) | |
intervalPriorityRepository.insert(IntervalPriority(2, 1, 1)) | |
val calendar = Calendar.getInstance() | |
val sdf = SimpleDateFormat("dd/MM/yyyy:hh/mm/ss") | |
calendar.time = sdf.parse("19/05/2019:12/00/00") | |
val tracks = uiPlayListUseCase.getUiPlayList(calendar) | |
assertEquals(20, intervalOrderRepository.getAll().size) | |
assertEquals(20, tracks.size) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment