Search in sources :

Example 46 with WikiSite

use of org.wikipedia.dataclient.WikiSite in project apps-android-wikipedia by wikimedia.

the class WikiSiteTypeAdapterTest method testReadLegacyUri.

@Test
public void testReadLegacyUri() {
    String json = "{\"domain\": \"test.wikipedia.org\", \"languageCode\": \"test\"}";
    WikiSite expected = WikiSite.forLanguageCode("test");
    assertThat(unmarshal(WikiSite.class, json), is(expected));
}
Also used : WikiSite(org.wikipedia.dataclient.WikiSite) Test(org.junit.Test)

Aggregations

WikiSite (org.wikipedia.dataclient.WikiSite)46 Test (org.junit.Test)23 PageTitle (org.wikipedia.page.PageTitle)13 ArrayList (java.util.ArrayList)7 HistoryEntry (org.wikipedia.history.HistoryEntry)6 List (java.util.List)5 SuppressLint (android.annotation.SuppressLint)4 NonNull (android.support.annotation.NonNull)4 View (android.view.View)4 Date (java.util.Date)4 Uri (android.net.Uri)3 HashMap (java.util.HashMap)3 PageProperties (org.wikipedia.page.PageProperties)3 Context (android.content.Context)2 Bundle (android.os.Bundle)2 RecyclerView (android.support.v7.widget.RecyclerView)2 BindView (butterknife.BindView)2 AndroidSchedulers (io.reactivex.android.schedulers.AndroidSchedulers)2 Schedulers (io.reactivex.schedulers.Schedulers)2 JSONException (org.json.JSONException)2