Search in sources :

Example 1 with PocketHub

use of com.github.pockethub.android.PocketHub in project PocketHub by pockethub.

the class GistFilesViewActivityTest method setUp.

@Before
public void setUp() {
    Context context = getInstrumentation().getTargetContext();
    PocketHub pocketHub = (PocketHub) context.getApplicationContext();
    store = pocketHub.applicationComponent().gistStore();
    Map<String, GistFile> files = new ArrayMap<>();
    GistFile a = GistFile.builder().content("aa").filename("a").build();
    GistFile b = GistFile.builder().content("bb").filename("b").build();
    files.put("a", a);
    files.put("b", b);
    gist = Gist.builder().id("abcd").files(files).build();
    store.addGist(gist);
    activityTestRule.launchActivity(GistFilesViewActivity.Companion.createIntent(gist, 0));
}
Also used : Context(android.content.Context) PocketHub(com.github.pockethub.android.PocketHub) ArrayMap(androidx.collection.ArrayMap) GistFile(com.meisolsson.githubsdk.model.GistFile) Before(org.junit.Before)

Aggregations

Context (android.content.Context)1 ArrayMap (androidx.collection.ArrayMap)1 PocketHub (com.github.pockethub.android.PocketHub)1 GistFile (com.meisolsson.githubsdk.model.GistFile)1 Before (org.junit.Before)1