Search in sources :

Example 6 with VerseRange

use of com.quran.labs.androidquran.data.VerseRange in project quran_android by quran.

the class BaseTranslationPresenterTest method testCombineAyahDataArabicEmptyTranslations.

@Test
public void testCombineAyahDataArabicEmptyTranslations() {
    VerseRange verseRange = new VerseRange(1, 1, 1, 2, 2);
    List<QuranText> arabic = Arrays.asList(new QuranText(1, 1, "first ayah"), new QuranText(1, 2, "second ayah"));
    List<QuranAyahInfo> info = presenter.combineAyahData(verseRange, arabic, new ArrayList<>());
    assertThat(info).hasSize(2);
    assertThat(info.get(0).sura).isEqualTo(1);
    assertThat(info.get(0).ayah).isEqualTo(1);
    assertThat(info.get(0).texts).hasSize(0);
    assertThat(info.get(0).arabicText).isEqualTo("first ayah");
    assertThat(info.get(1).sura).isEqualTo(1);
    assertThat(info.get(1).ayah).isEqualTo(2);
    assertThat(info.get(1).texts).hasSize(0);
    assertThat(info.get(1).arabicText).isEqualTo("second ayah");
}
Also used : VerseRange(com.quran.labs.androidquran.data.VerseRange) QuranAyahInfo(com.quran.labs.androidquran.common.QuranAyahInfo) QuranText(com.quran.labs.androidquran.common.QuranText) Test(org.junit.Test)

Aggregations

VerseRange (com.quran.labs.androidquran.data.VerseRange)6 QuranAyahInfo (com.quran.labs.androidquran.common.QuranAyahInfo)5 QuranText (com.quran.labs.androidquran.common.QuranText)5 Test (org.junit.Test)5 Activity (android.app.Activity)1 Context (android.content.Context)1 Bundle (android.os.Bundle)1 NonNull (android.support.annotation.NonNull)1 LayoutInflater (android.view.LayoutInflater)1 View (android.view.View)1 ViewGroup (android.view.ViewGroup)1 Button (android.widget.Button)1 ProgressBar (android.widget.ProgressBar)1 R (com.quran.labs.androidquran.R)1 LocalTranslation (com.quran.labs.androidquran.common.LocalTranslation)1 QuranInfo (com.quran.labs.androidquran.data.QuranInfo)1 InlineTranslationPresenter (com.quran.labs.androidquran.presenter.translation.InlineTranslationPresenter)1 PagerActivity (com.quran.labs.androidquran.ui.PagerActivity)1 TranslationsSpinnerAdapter (com.quran.labs.androidquran.ui.util.TranslationsSpinnerAdapter)1 QuranSettings (com.quran.labs.androidquran.util.QuranSettings)1