Created
June 3, 2015 15:34
-
-
Save stephenmac7/a40a0536f973393451f1 to your computer and use it in GitHub Desktop.
Android bug reproduction code
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 characters
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); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment