Skip to content

Instantly share code, notes, and snippets.

@leviwilson
Created February 7, 2012 15:00
Show Gist options
  • Select an option

  • Save leviwilson/1760101 to your computer and use it in GitHub Desktop.

Select an option

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