Search in sources :

Example 1 with GitHubProvider

use of io.reark.rxgithubapp.advanced.data.schematicProvider.generated.GitHubProvider in project reark by reark.

the class GitHubRepositoryStoreTest method setUp.

@Before
@Override
public void setUp() throws Exception {
    setContext(InstrumentationRegistry.getTargetContext());
    final ProviderInfo providerInfo = new ProviderInfo();
    providerInfo.authority = GitHubProvider.AUTHORITY;
    contentProvider = new GitHubProvider();
    contentProvider.attachInfo(InstrumentationRegistry.getTargetContext(), providerInfo);
    contentProvider.delete(GITHUB_REPOSITORIES, null, null);
    Thread.sleep(PROVIDER_WAIT_TIME);
    final MockContentResolver contentResolver = new MockContentResolver();
    contentResolver.addProvider(GitHubProvider.AUTHORITY, contentProvider);
    gitHubRepositoryStore = new GitHubRepositoryStore(contentResolver, gson);
    testObserver = new TestObserver<>();
    super.setUp();
}
Also used : ProviderInfo(android.content.pm.ProviderInfo) GitHubProvider(io.reark.rxgithubapp.advanced.data.schematicProvider.generated.GitHubProvider) MockContentResolver(android.test.mock.MockContentResolver) Before(org.junit.Before)

Example 2 with GitHubProvider

use of io.reark.rxgithubapp.advanced.data.schematicProvider.generated.GitHubProvider in project reark by reark.

the class GitHubRepositoryStoreCoreTest method setUp.

@Before
@Override
public void setUp() throws Exception {
    setContext(InstrumentationRegistry.getTargetContext());
    final ProviderInfo providerInfo = new ProviderInfo();
    providerInfo.authority = GitHubProvider.AUTHORITY;
    contentProvider = new GitHubProvider();
    contentProvider.attachInfo(InstrumentationRegistry.getTargetContext(), providerInfo);
    contentProvider.delete(GITHUB_REPOSITORIES, null, null);
    Thread.sleep(PROVIDER_WAIT_TIME);
    final MockContentResolver contentResolver = new MockContentResolver();
    contentResolver.addProvider(GitHubProvider.AUTHORITY, contentProvider);
    gitHubRepositoryStoreCore = new GitHubRepositoryStoreCore(contentResolver, new Gson());
    super.setUp();
}
Also used : ProviderInfo(android.content.pm.ProviderInfo) GitHubProvider(io.reark.rxgithubapp.advanced.data.schematicProvider.generated.GitHubProvider) Gson(com.google.gson.Gson) MockContentResolver(android.test.mock.MockContentResolver) Before(org.junit.Before)

Aggregations

ProviderInfo (android.content.pm.ProviderInfo)2 MockContentResolver (android.test.mock.MockContentResolver)2 GitHubProvider (io.reark.rxgithubapp.advanced.data.schematicProvider.generated.GitHubProvider)2 Before (org.junit.Before)2 Gson (com.google.gson.Gson)1