Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.dcarr1.test;
- import android.test.ActivityInstrumentationTestCase2;
- import com.example.dcarr1.MainActivity;
- public class MainActivityTest extends
- ActivityInstrumentationTestCase2<MainActivity> {
- private MainActivity mActivity;
- public MainActivityTest(String name) {
- super(MainActivity.class);
- }
- protected void setUp() throws Exception {
- super.setUp();
- mActivity = getActivity();
- }
- public void testText() {
- assertEquals("Hello David!",(String)mActivity.getText(com.example.dcarr1.R.string.hello_world));
- }
- protected void tearDown() throws Exception {
- super.tearDown();
- mActivity.finish();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment