Skip to content

Instantly share code, notes, and snippets.

@leviwilson
Created February 7, 2012 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leviwilson/1760101 to your computer and use it in GitHub Desktop.
Save leviwilson/1760101 to your computer and use it in GitHub Desktop.
ABS Issue - FragmentActivity
public class AbsFragmentActivity extends FragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActionBar actionBar = getSupportActionBar();
}
}
public class AbsFragmentActivityTest extends ActivityUnitTestCase<AbsFragmentActivity> {
public AbsFragmentActivityTest() {
super(AbsFragmentActivity.class);
}
public testThatActionBarCanBeTested() {
startActivity(new Intent(), null, null);
assertNotNull(getActivity().getSupportActionBar());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment