use of com.quran.data.source.PageProvider in project quran_android by quran.
the class AudioUtilsTest method testGetLastAyahWithNewSurahOnNextPageForMadani.
@Test
public void testGetLastAyahWithNewSurahOnNextPageForMadani() throws Exception {
PageProvider pageProviderMock = Mockito.mock(PageProvider.class);
when(pageProviderMock.getDataSource()).thenReturn(new MadaniDataSource());
QuranInfo quranInfoMock = new QuranInfo(pageProviderMock);
AudioUtils audioUtils = new AudioUtils(quranInfoMock, null);
SuraAyah lastAyah = audioUtils.getLastAyahToPlay(new SuraAyah(109, 1), 603, 1, false);
assertTrue(lastAyah.ayah == 5);
assertTrue(lastAyah.sura == 111);
}
Aggregations