Skip to content

Instantly share code, notes, and snippets.

@livando
Created October 4, 2010 15:24
Show Gist options
  • Save livando/609870 to your computer and use it in GitHub Desktop.
Save livando/609870 to your computer and use it in GitHub Desktop.
public class HelloAndroidTest extends ActivityInstrumentationTestCase2<Hello> {
private Hello mActivity;
private TextView mView;
private String resourceString;
public HelloAndroidTest() {
super("com.livando.hello", Hello.class);
}
@Override
protected void setUp() throws Exception {
super.setUp();
mActivity = this.getActivity();
mView = (TextView) mActivity.findViewById(com.livando.hello.R.id.textview);
resourceString = mActivity.getString(com.livando.hello.R.string.hello);
}
public void testPreconditions(){
assertNotNull(mView);
}
public void testText(){
assertEquals(resourceString, mView.getText());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment