android.test.mock.MockApplication Java Examples

The following examples show how to use android.test.mock.MockApplication. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SanityTest.java    From pretty with MIT License 6 votes vote down vote up
@Test
@UiThreadTest
public void testWrapActivity() throws Exception {
    Intent intent = new Intent();
    intent.setComponent(new ComponentName("com.madisp.pretty", "TestActivity"));

    Activity act = instrumentation.newActivity(
            Activity.class,
            context,
            null,
            new MockApplication(),
            intent,
            new ActivityInfo(),
            "",
            null,
            null,
            null);
    Pretty.wrap(act);
}