Search in sources :

Example 6 with TestContentProvider1

use of org.robolectric.shadows.testing.TestContentProvider1 in project robolectric by robolectric.

the class ContentProviderControllerTest method shouldSetBaseContext.

@Test
public void shouldSetBaseContext() throws Exception {
    TestContentProvider1 myContentProvider = controller.create().get();
    assertThat(myContentProvider.getContext()).isEqualTo(((Application) ApplicationProvider.getApplicationContext()).getBaseContext());
}
Also used : TestContentProvider1(org.robolectric.shadows.testing.TestContentProvider1) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 TestContentProvider1 (org.robolectric.shadows.testing.TestContentProvider1)6 ContentProvider (android.content.ContentProvider)1 PathPermission (android.content.pm.PathPermission)1 Config (org.robolectric.annotation.Config)1