Created
June 3, 2015 15:34
-
-
Save stephenmac7/a40a0536f973393451f1 to your computer and use it in GitHub Desktop.
Revisions
-
stephenmac7 created this gist
Jun 3, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ package com.example.stephen.myapplication; import android.test.ActivityInstrumentationTestCase2; import android.test.TouchUtils; import android.widget.TextView; /** * Created by stephen on 15/06/03. */ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActivity> { private MainActivity activity; private TextView hello; public MainActivityTest() { super(MainActivity.class); } @Override protected void setUp() throws Exception { super.setUp(); setActivityInitialTouchMode(true); activity = getActivity(); hello = (TextView) activity.findViewById(R.id.hello_world); } public void testHelloClick() { TouchUtils.clickView(this, hello); } }