@Test public void signOutButtonShouldBeDisabledWhenNotSignedIn() throws Exception { authenticationGateway.signOut(); TestMenu menu = new TestMenu(); activity.onPrepareOptionsMenu(menu); TestMenuItem signOutMenuItem = (TestMenuItem) menu.getItem(0); assertThat(signOutMenuItem.isEnabled(), equalTo(false)); assertThat(signOutMenuItem.getTitle().toString(), equalTo("Sign Out")); }
@Override public boolean onPrepareOptionsMenu(Menu menu) { menu.clear(); addSignOutMenuItem(menu); return true; }
RecentActivityActivity extends Activity { @Override public boolean onPrepareOptionsMenu(Menu menu) { menu.clear(); addSignOutMenuItem(menu); return true; } }
RecentActivityActivity extends Activity { @Override public boolean onPrepareOptionsMenu(Menu menu) { menu.clear(); addSignOutMenuItem(menu); return true; }  }
RecentActivityActivity extends Activity { @Override public boolean onPrepareOptionsMenu(Menu menu) { menu.clear(); addSignOutMenuItem(menu); return true; }  @Override boolean onPrepareOptionsMenu(Menu menu); }
RecentActivityActivity extends Activity { @Override public boolean onPrepareOptionsMenu(Menu menu) { menu.clear(); addSignOutMenuItem(menu); return true; }  @Override boolean onPrepareOptionsMenu(Menu menu);  }