Skip to content

Instantly share code, notes, and snippets.

@goofyahead
Created April 4, 2017 07:27
Show Gist options
  • Save goofyahead/9c849f5833c09d2633eea2ffb9e022a0 to your computer and use it in GitHub Desktop.
Save goofyahead/9c849f5833c09d2633eea2ffb9e022a0 to your computer and use it in GitHub Desktop.
@Config(constants = BuildConfig.class, sdk = 21, application = TestApplication.class)
@RunWith(RobolectricTestRunner.class)
public class TestMainActivity {
private MainActivity mainActivity;
@Before
public void setUp() throws Exception {
}
@Test
public void addition_isCorrect() throws Exception {
mainActivity = Robolectric.buildActivity(MainActivity.class).create().visible().get();
assertEquals("flumbolate test", mainActivity.flumbolate());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment